woops i should have added a .gitignore
This commit is contained in:
parent
6109bae0a5
commit
68060fba97
14 changed files with 2 additions and 1707 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
public/
|
||||||
|
.hugo_build.lock
|
234
public/404.html
234
public/404.html
|
@ -1,234 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en-gb">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<link rel="shortcut icon" href="https://blog.vulpine.solutions/favicon.png" />
|
|
||||||
<title>404</title>
|
|
||||||
<meta name="title" content="404 Page not found" />
|
|
||||||
<meta name="description" content="vulpine problems require vulpine solutions" />
|
|
||||||
<meta name="keywords" content="" />
|
|
||||||
|
|
||||||
|
|
||||||
<meta property="og:url" content="https://blog.vulpine.solutions/404.html">
|
|
||||||
<meta property="og:site_name" content="vulpine solutions">
|
|
||||||
<meta property="og:title" content="404 Page not found">
|
|
||||||
<meta property="og:description" content="vulpine problems require vulpine solutions">
|
|
||||||
<meta property="og:locale" content="en_gb">
|
|
||||||
<meta property="og:type" content="website">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary">
|
|
||||||
<meta name="twitter:title" content="404 Page not found">
|
|
||||||
<meta name="twitter:description" content="vulpine problems require vulpine solutions">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta itemprop="name" content="404 Page not found">
|
|
||||||
<meta itemprop="description" content="vulpine problems require vulpine solutions">
|
|
||||||
<meta name="referrer" content="no-referrer-when-downgrade" />
|
|
||||||
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: Verdana, sans-serif;
|
|
||||||
margin: auto;
|
|
||||||
padding: 20px;
|
|
||||||
max-width: 720px;
|
|
||||||
text-align: left;
|
|
||||||
background-color: #fff;
|
|
||||||
word-wrap: break-word;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #3273dc;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
text-decoration: none;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title span {
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
content {
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
padding: 2px 5px;
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #222;
|
|
||||||
display: block;
|
|
||||||
padding: 20px;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
font-size: 14px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight pre {
|
|
||||||
background-color: initial;
|
|
||||||
color: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight code {
|
|
||||||
background-color: unset;
|
|
||||||
color: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
border-left: 1px solid #999;
|
|
||||||
color: #222;
|
|
||||||
padding-left: 20px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
padding: 25px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #777;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
.errorlist {
|
|
||||||
color: #eba613;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ul.blog-posts {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li span {
|
|
||||||
flex: 0 0 130px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li a:visited {
|
|
||||||
color: #8b6fcb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
body {
|
|
||||||
background-color: #333;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #8cc2dd;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
background-color: #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea,
|
|
||||||
input {
|
|
||||||
background-color: #252525;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header><a href="/" class="title">
|
|
||||||
<h2>vulpine solutions</h2>
|
|
||||||
</a>
|
|
||||||
<nav><a href="/">Home</a>
|
|
||||||
|
|
||||||
|
|
||||||
<a href="/blog">Blog</a>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
<main>
|
|
||||||
<h1>404</h1>
|
|
||||||
<h2>ʕノ•ᴥ•ʔノ ︵ ┻━┻</h2>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
<footer>Made with <a href="https://github.com/janraasch/hugo-bearblog/">Hugo ʕ•ᴥ•ʔ Bear</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
Binary file not shown.
|
@ -1,288 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en-gb">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<link rel="shortcut icon" href="https://blog.vulpine.solutions/favicon.png" />
|
|
||||||
<title>go's panics are fundamentally flawed | vulpine solutions</title>
|
|
||||||
<meta name="title" content="go's panics are fundamentally flawed" />
|
|
||||||
<meta name="description" content="(alternative title: panic() considered harmful)
|
|
||||||
errors, how do they work anyway?
|
|
||||||
errors in Go programs are represented by values. when calling a function that may return an error, it’ll return (T, error), and you can handle the error the same way you would any other value.
|
|
||||||
(note: the (T, error) syntax doesn’t imply Go has tuples, because it doesn’t. functions can just return multiple values.)
|
|
||||||
now, this approach does have some problems. Go lets you ignore the error very easily, by using the discard operator _ rather than assigning it to a variable. it’s also extremely verbose–anyone who has used Go a substantial amount has written if err != nil { return err } 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." />
|
|
||||||
<meta name="keywords" content="" />
|
|
||||||
|
|
||||||
|
|
||||||
<meta property="og:url" content="https://blog.vulpine.solutions/blog/go-panics-are-fundamentally-flawed/">
|
|
||||||
<meta property="og:site_name" content="vulpine solutions">
|
|
||||||
<meta property="og:title" content="go's panics are fundamentally flawed">
|
|
||||||
<meta property="og:description" content="(alternative title: panic() considered harmful)
|
|
||||||
errors, how do they work anyway? errors in Go programs are represented by values. when calling a function that may return an error, it’ll return (T, error), and you can handle the error the same way you would any other value.
|
|
||||||
(note: the (T, error) syntax doesn’t imply Go has tuples, because it doesn’t. functions can just return multiple values.)
|
|
||||||
now, this approach does have some problems. Go lets you ignore the error very easily, by using the discard operator _ rather than assigning it to a variable. it’s also extremely verbose–anyone who has used Go a substantial amount has written if err != nil { return err } 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.">
|
|
||||||
<meta property="og:locale" content="en_gb">
|
|
||||||
<meta property="og:type" content="article">
|
|
||||||
<meta property="article:section" content="blog">
|
|
||||||
<meta property="article:published_time" content="2024-11-05T00:00:00+00:00">
|
|
||||||
<meta property="article:modified_time" content="2024-11-05T00:00:00+00:00">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary">
|
|
||||||
<meta name="twitter:title" content="go's panics are fundamentally flawed">
|
|
||||||
<meta name="twitter:description" content="(alternative title: panic() considered harmful)
|
|
||||||
errors, how do they work anyway? errors in Go programs are represented by values. when calling a function that may return an error, it’ll return (T, error), and you can handle the error the same way you would any other value.
|
|
||||||
(note: the (T, error) syntax doesn’t imply Go has tuples, because it doesn’t. functions can just return multiple values.)
|
|
||||||
now, this approach does have some problems. Go lets you ignore the error very easily, by using the discard operator _ rather than assigning it to a variable. it’s also extremely verbose–anyone who has used Go a substantial amount has written if err != nil { return err } 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.">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta itemprop="name" content="go's panics are fundamentally flawed">
|
|
||||||
<meta itemprop="description" content="(alternative title: panic() considered harmful)
|
|
||||||
errors, how do they work anyway? errors in Go programs are represented by values. when calling a function that may return an error, it’ll return (T, error), and you can handle the error the same way you would any other value.
|
|
||||||
(note: the (T, error) syntax doesn’t imply Go has tuples, because it doesn’t. functions can just return multiple values.)
|
|
||||||
now, this approach does have some problems. Go lets you ignore the error very easily, by using the discard operator _ rather than assigning it to a variable. it’s also extremely verbose–anyone who has used Go a substantial amount has written if err != nil { return err } 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.">
|
|
||||||
<meta itemprop="datePublished" content="2024-11-05T00:00:00+00:00">
|
|
||||||
<meta itemprop="dateModified" content="2024-11-05T00:00:00+00:00">
|
|
||||||
<meta itemprop="wordCount" content="779">
|
|
||||||
<meta name="referrer" content="no-referrer-when-downgrade" />
|
|
||||||
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: Verdana, sans-serif;
|
|
||||||
margin: auto;
|
|
||||||
padding: 20px;
|
|
||||||
max-width: 720px;
|
|
||||||
text-align: left;
|
|
||||||
background-color: #fff;
|
|
||||||
word-wrap: break-word;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #3273dc;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
text-decoration: none;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title span {
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
content {
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
padding: 2px 5px;
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #222;
|
|
||||||
display: block;
|
|
||||||
padding: 20px;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
font-size: 14px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight pre {
|
|
||||||
background-color: initial;
|
|
||||||
color: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight code {
|
|
||||||
background-color: unset;
|
|
||||||
color: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
border-left: 1px solid #999;
|
|
||||||
color: #222;
|
|
||||||
padding-left: 20px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
padding: 25px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #777;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
.errorlist {
|
|
||||||
color: #eba613;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ul.blog-posts {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li span {
|
|
||||||
flex: 0 0 130px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li a:visited {
|
|
||||||
color: #8b6fcb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
body {
|
|
||||||
background-color: #333;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #8cc2dd;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
background-color: #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea,
|
|
||||||
input {
|
|
||||||
background-color: #252525;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header><a href="/" class="title">
|
|
||||||
<h2>vulpine solutions</h2>
|
|
||||||
</a>
|
|
||||||
<nav><a href="/">Home</a>
|
|
||||||
|
|
||||||
|
|
||||||
<a href="/blog">Blog</a>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
<main>
|
|
||||||
|
|
||||||
<h1>go's panics are fundamentally flawed</h1>
|
|
||||||
<p>
|
|
||||||
<i>
|
|
||||||
<time datetime='2024-11-05' pubdate>
|
|
||||||
Nov 5, 2024
|
|
||||||
</time>
|
|
||||||
</i>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<content>
|
|
||||||
<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’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’t imply Go has tuples, because it doesn’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’s also extremely verbose–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>
|
|
||||||
<h2 id="panic-at-the-goroutine">panic! at the goroutine</h2>
|
|
||||||
<p>what <em>isn’t</em> fixable, though, is the panic system. any function, no matter its signature, can call <code>panic()</code> at any point, with any value. as soon as it’s called, the call stack unwinds all the way to <code>main()</code> and the program crashes. a function doesn’t have to indicate that it can do this. in fact, it <em>can’t</em>, except in a documentation comment.</p>
|
|
||||||
<p>you can catch panics with a call to <code>recover()</code>. you <em>can’t</em> put this below a function that might panic, though, you have to use <code>defer</code> <em>before</em> the panic happens. <code>recover()</code> will return the value passed to <code>panic()</code>, or no value if no function panicked. (ironically, <code>recover()</code> <em>also</em> doesn’t return an error, or even a boolean, when nothing panicked. you check if the return value is <code>nil</code> instead.)</p>
|
|
||||||
<p>this is basically a worse version of <code>try { } catch { }</code> in other languages. you can’t guarantee that the value returned by <code>recover()</code> is an error, it can be <em>any</em> type. it moves error recovery away from the source of the error. and, of course, it’s inconsistent: the <code>(T, error)</code> pattern lulls you into a false sense of security, making you think that you handled all possible errors in your application, when surprise! it can always panic.</p>
|
|
||||||
<h2 id="how-this-could-be-fixed">how this could be fixed</h2>
|
|
||||||
<p>simple: remove <code>panic()</code> entirely. all functions that panic now must instead return an error, and the caller must <em>handle</em> that error. now when a function doesn’t return an error type, you <em>know</em> it can’t ever crash your program! problem solv–</p>
|
|
||||||
<p>oh. the language itself panics quite a bit as well. trying to access a slice index that doesn’t exist, trying to assign to a <code>nil</code> map, dereferencing a <code>nil</code> pointer, trying to write to a map from multiple goroutines simultaneously, and more can all cause panics. that requires a little more thought.</p>
|
|
||||||
<p>well, here we go:</p>
|
|
||||||
<ul>
|
|
||||||
<li>slice indexing could simply <em>also</em> return a <code>(T, error)</code>, or at least <code>(T, bool)</code>, at all times, unless the index is known to exist at compile time. this would be extremely annoying in the current version of the language, but would be fine if a more streamlined way of bubbling errors up was added, such as borrowing Rust’s <code>?</code> operator.</li>
|
|
||||||
<li><code>nil</code> maps should be removed entirely. every map is strongly typed to begin with, and there is no practical difference between a <code>nil</code> map and an empty one. in my mind, the current behaviour is the language exposing an implementation detail (distinguishing between <code>nil</code> and empty maps) for no real reason.</li>
|
|
||||||
<li>similarly to slices, accessing a pointer could also return <code>(T, error)</code>. borrowing C#’s <code>?</code> operator to streamline accessing deeply nested values would help here. alternatively, do away with pointers entirely and replace it with a system similar to Rust’s <code>Option<T></code> type.</li>
|
|
||||||
<li>i’m not entirely sure how to handle maps in multiple goroutines. the easy solution would be to wrap every single map in a <code>sync.RWMutex</code>, but this would massively slow down single-threaded programs, which is why <a href="https://go.dev/doc/faq#atomic_maps">the developers decided against doing this in the first place</a>. maybe assigning to a map could return a boolean, with <code>false</code> meaning the write failed because another goroutine wrote to it at the same time. that’s not a perfect solution, though.</li>
|
|
||||||
</ul>
|
|
||||||
<p>but really, the biggest problem with panics is that all of the decisions surrounding them are set in stone, forever. Go intends to never release 2.0, which is understandable: they don’t want a repeat of the Python 2 to 3 transition. but it also means the language can never truly grow past some of its faults.</p>
|
|
||||||
<p>luckily, this is all just a thought experiment. if i want a more reasonable error handling system, there are so many other languages to choose from. such as c#–<code>System.NullReferenceException</code> …oh, never mind.</p>
|
|
||||||
|
|
||||||
</content>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
<footer>Made with <a href="https://github.com/janraasch/hugo-bearblog/">Hugo ʕ•ᴥ•ʔ Bear</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,267 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en-gb">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<link rel="shortcut icon" href="https://blog.vulpine.solutions/favicon.png" />
|
|
||||||
<title>hello world! | vulpine solutions</title>
|
|
||||||
<meta name="title" content="hello world!" />
|
|
||||||
<meta name="description" content="oh hey, it’s the stereotypical “hello world” post. look at me! i copy pasted a hugo tutorial!
|
|
||||||
turns out making a blog is really difficult, and not for technical reasons. it’s just really hard to actually write things consistently.
|
|
||||||
i can’t promise anything in that regard–expect this site to get about one post a year, and that’s if i actually remember it exists.
|
|
||||||
until then though, have fun reading the one rant i’ve already written. hope you like go because if not, it probably isn’t for you!" />
|
|
||||||
<meta name="keywords" content="" />
|
|
||||||
|
|
||||||
|
|
||||||
<meta property="og:url" content="https://blog.vulpine.solutions/blog/hello-world/">
|
|
||||||
<meta property="og:site_name" content="vulpine solutions">
|
|
||||||
<meta property="og:title" content="hello world!">
|
|
||||||
<meta property="og:description" content="oh hey, it’s the stereotypical “hello world” post. look at me! i copy pasted a hugo tutorial!
|
|
||||||
turns out making a blog is really difficult, and not for technical reasons. it’s just really hard to actually write things consistently. i can’t promise anything in that regard–expect this site to get about one post a year, and that’s if i actually remember it exists.
|
|
||||||
until then though, have fun reading the one rant i’ve already written. hope you like go because if not, it probably isn’t for you!">
|
|
||||||
<meta property="og:locale" content="en_gb">
|
|
||||||
<meta property="og:type" content="article">
|
|
||||||
<meta property="article:section" content="blog">
|
|
||||||
<meta property="article:published_time" content="2024-11-04T00:00:00+00:00">
|
|
||||||
<meta property="article:modified_time" content="2024-11-04T00:00:00+00:00">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary">
|
|
||||||
<meta name="twitter:title" content="hello world!">
|
|
||||||
<meta name="twitter:description" content="oh hey, it’s the stereotypical “hello world” post. look at me! i copy pasted a hugo tutorial!
|
|
||||||
turns out making a blog is really difficult, and not for technical reasons. it’s just really hard to actually write things consistently. i can’t promise anything in that regard–expect this site to get about one post a year, and that’s if i actually remember it exists.
|
|
||||||
until then though, have fun reading the one rant i’ve already written. hope you like go because if not, it probably isn’t for you!">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta itemprop="name" content="hello world!">
|
|
||||||
<meta itemprop="description" content="oh hey, it’s the stereotypical “hello world” post. look at me! i copy pasted a hugo tutorial!
|
|
||||||
turns out making a blog is really difficult, and not for technical reasons. it’s just really hard to actually write things consistently. i can’t promise anything in that regard–expect this site to get about one post a year, and that’s if i actually remember it exists.
|
|
||||||
until then though, have fun reading the one rant i’ve already written. hope you like go because if not, it probably isn’t for you!">
|
|
||||||
<meta itemprop="datePublished" content="2024-11-04T00:00:00+00:00">
|
|
||||||
<meta itemprop="dateModified" content="2024-11-04T00:00:00+00:00">
|
|
||||||
<meta itemprop="wordCount" content="87">
|
|
||||||
<meta name="referrer" content="no-referrer-when-downgrade" />
|
|
||||||
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: Verdana, sans-serif;
|
|
||||||
margin: auto;
|
|
||||||
padding: 20px;
|
|
||||||
max-width: 720px;
|
|
||||||
text-align: left;
|
|
||||||
background-color: #fff;
|
|
||||||
word-wrap: break-word;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #3273dc;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
text-decoration: none;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title span {
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
content {
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
padding: 2px 5px;
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #222;
|
|
||||||
display: block;
|
|
||||||
padding: 20px;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
font-size: 14px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight pre {
|
|
||||||
background-color: initial;
|
|
||||||
color: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight code {
|
|
||||||
background-color: unset;
|
|
||||||
color: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
border-left: 1px solid #999;
|
|
||||||
color: #222;
|
|
||||||
padding-left: 20px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
padding: 25px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #777;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
.errorlist {
|
|
||||||
color: #eba613;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ul.blog-posts {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li span {
|
|
||||||
flex: 0 0 130px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li a:visited {
|
|
||||||
color: #8b6fcb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
body {
|
|
||||||
background-color: #333;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #8cc2dd;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
background-color: #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea,
|
|
||||||
input {
|
|
||||||
background-color: #252525;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header><a href="/" class="title">
|
|
||||||
<h2>vulpine solutions</h2>
|
|
||||||
</a>
|
|
||||||
<nav><a href="/">Home</a>
|
|
||||||
|
|
||||||
|
|
||||||
<a href="/blog">Blog</a>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
<main>
|
|
||||||
|
|
||||||
<h1>hello world!</h1>
|
|
||||||
<p>
|
|
||||||
<i>
|
|
||||||
<time datetime='2024-11-04' pubdate>
|
|
||||||
Nov 4, 2024
|
|
||||||
</time>
|
|
||||||
</i>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<content>
|
|
||||||
<p>oh hey, it’s the stereotypical “hello world” 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’s just really hard to actually write things consistently.
|
|
||||||
i can’t promise anything in that regard–expect this site to get about one post a year, and that’s <em>if</em> i actually remember it exists.</p>
|
|
||||||
<p>until then though, have fun reading the one rant i’ve already written. hope you like go because if not, it probably isn’t for you!</p>
|
|
||||||
|
|
||||||
</content>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
<footer>Made with <a href="https://github.com/janraasch/hugo-bearblog/">Hugo ʕ•ᴥ•ʔ Bear</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,281 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en-gb">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<link rel="shortcut icon" href="https://blog.vulpine.solutions/favicon.png" />
|
|
||||||
<title>Blog | vulpine solutions</title>
|
|
||||||
<meta name="title" content="Blog" />
|
|
||||||
<meta name="description" content="vulpine problems require vulpine solutions" />
|
|
||||||
<meta name="keywords" content="" />
|
|
||||||
|
|
||||||
|
|
||||||
<meta property="og:url" content="https://blog.vulpine.solutions/blog/">
|
|
||||||
<meta property="og:site_name" content="vulpine solutions">
|
|
||||||
<meta property="og:title" content="Blog">
|
|
||||||
<meta property="og:description" content="vulpine problems require vulpine solutions">
|
|
||||||
<meta property="og:locale" content="en_gb">
|
|
||||||
<meta property="og:type" content="website">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary">
|
|
||||||
<meta name="twitter:title" content="Blog">
|
|
||||||
<meta name="twitter:description" content="vulpine problems require vulpine solutions">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta itemprop="name" content="Blog">
|
|
||||||
<meta itemprop="description" content="vulpine problems require vulpine solutions">
|
|
||||||
<meta itemprop="datePublished" content="2024-12-02T00:00:00+00:00">
|
|
||||||
<meta itemprop="dateModified" content="2024-12-02T00:00:00+00:00">
|
|
||||||
<meta name="referrer" content="no-referrer-when-downgrade" />
|
|
||||||
|
|
||||||
<link rel="alternate" type="application/rss+xml" href="https://blog.vulpine.solutions/blog/index.xml" title="vulpine solutions" />
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: Verdana, sans-serif;
|
|
||||||
margin: auto;
|
|
||||||
padding: 20px;
|
|
||||||
max-width: 720px;
|
|
||||||
text-align: left;
|
|
||||||
background-color: #fff;
|
|
||||||
word-wrap: break-word;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #3273dc;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
text-decoration: none;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title span {
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
content {
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
padding: 2px 5px;
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #222;
|
|
||||||
display: block;
|
|
||||||
padding: 20px;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
font-size: 14px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight pre {
|
|
||||||
background-color: initial;
|
|
||||||
color: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight code {
|
|
||||||
background-color: unset;
|
|
||||||
color: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
border-left: 1px solid #999;
|
|
||||||
color: #222;
|
|
||||||
padding-left: 20px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
padding: 25px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #777;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
.errorlist {
|
|
||||||
color: #eba613;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ul.blog-posts {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li span {
|
|
||||||
flex: 0 0 130px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li a:visited {
|
|
||||||
color: #8b6fcb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
body {
|
|
||||||
background-color: #333;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #8cc2dd;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
background-color: #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea,
|
|
||||||
input {
|
|
||||||
background-color: #252525;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header><a href="/" class="title">
|
|
||||||
<h2>vulpine solutions</h2>
|
|
||||||
</a>
|
|
||||||
<nav><a href="/">Home</a>
|
|
||||||
|
|
||||||
|
|
||||||
<a href="/blog">Blog</a>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
<main>
|
|
||||||
<content>
|
|
||||||
|
|
||||||
<ul class="blog-posts">
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<span>
|
|
||||||
<i>
|
|
||||||
<time datetime='2024-12-02' pubdate>
|
|
||||||
Dec 2, 2024
|
|
||||||
</time>
|
|
||||||
</i>
|
|
||||||
</span>
|
|
||||||
<a href="https://blog.vulpine.solutions/blog/rust-is-good-just-not-for-me/">rust is good, just not for me</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<span>
|
|
||||||
<i>
|
|
||||||
<time datetime='2024-11-05' pubdate>
|
|
||||||
Nov 5, 2024
|
|
||||||
</time>
|
|
||||||
</i>
|
|
||||||
</span>
|
|
||||||
<a href="https://blog.vulpine.solutions/blog/go-panics-are-fundamentally-flawed/">go's panics are fundamentally flawed</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<span>
|
|
||||||
<i>
|
|
||||||
<time datetime='2024-11-04' pubdate>
|
|
||||||
Nov 4, 2024
|
|
||||||
</time>
|
|
||||||
</i>
|
|
||||||
</span>
|
|
||||||
<a href="https://blog.vulpine.solutions/blog/hello-world/">hello world!</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<small>
|
|
||||||
<div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</small>
|
|
||||||
|
|
||||||
</content>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
<footer>Made with <a href="https://github.com/janraasch/hugo-bearblog/">Hugo ʕ•ᴥ•ʔ Bear</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,34 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
||||||
<channel>
|
|
||||||
<title>Blog on vulpine solutions</title>
|
|
||||||
<link>https://blog.vulpine.solutions/blog/</link>
|
|
||||||
<description>Recent content in Blog on vulpine solutions</description>
|
|
||||||
<generator>Hugo</generator>
|
|
||||||
<language>en-gb</language>
|
|
||||||
<copyright>sam, CC-BY-SA 4.0</copyright>
|
|
||||||
<lastBuildDate>Mon, 02 Dec 2024 00:00:00 +0000</lastBuildDate>
|
|
||||||
<atom:link href="https://blog.vulpine.solutions/blog/index.xml" rel="self" type="application/rss+xml" />
|
|
||||||
<item>
|
|
||||||
<title>rust is good, just not for me</title>
|
|
||||||
<link>https://blog.vulpine.solutions/blog/rust-is-good-just-not-for-me/</link>
|
|
||||||
<pubDate>Mon, 02 Dec 2024 00:00:00 +0000</pubDate>
|
|
||||||
<guid>https://blog.vulpine.solutions/blog/rust-is-good-just-not-for-me/</guid>
|
|
||||||
<description><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></description>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<title>go's panics are fundamentally flawed</title>
|
|
||||||
<link>https://blog.vulpine.solutions/blog/go-panics-are-fundamentally-flawed/</link>
|
|
||||||
<pubDate>Tue, 05 Nov 2024 00:00:00 +0000</pubDate>
|
|
||||||
<guid>https://blog.vulpine.solutions/blog/go-panics-are-fundamentally-flawed/</guid>
|
|
||||||
<description><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></description>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<title>hello world!</title>
|
|
||||||
<link>https://blog.vulpine.solutions/blog/hello-world/</link>
|
|
||||||
<pubDate>Mon, 04 Nov 2024 00:00:00 +0000</pubDate>
|
|
||||||
<guid>https://blog.vulpine.solutions/blog/hello-world/</guid>
|
|
||||||
<description><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></description>
|
|
||||||
</item>
|
|
||||||
</channel>
|
|
||||||
</rss>
|
|
|
@ -1,295 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en-gb">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<link rel="shortcut icon" href="https://blog.vulpine.solutions/favicon.png" />
|
|
||||||
<title>rust is good, just not for me | vulpine solutions</title>
|
|
||||||
<meta name="title" content="rust is good, just not for me" />
|
|
||||||
<meta name="description" content="Rust is the big new1 thing in just about every programming niche. web frameworks? of course there’s a Rust one! in fact, there’s dozens of them. command line tools? good luck finding one that isn’t written in Rust these days. databases? oops, all Rust!
|
|
||||||
all of this carcinisation2 has me feeling kind of left out, though. you see, i’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’s hyped up to be, that it’s actually a lot worse than everyone says it is, but… it really isn’t. it is a good programming language. a great one, in fact! i want to dig a little deeper into why i, personally, don’t vibe with it. (not very deep, mind you, because self-reflection is difficult as hell)" />
|
|
||||||
<meta name="keywords" content="" />
|
|
||||||
|
|
||||||
|
|
||||||
<meta property="og:url" content="https://blog.vulpine.solutions/blog/rust-is-good-just-not-for-me/">
|
|
||||||
<meta property="og:site_name" content="vulpine solutions">
|
|
||||||
<meta property="og:title" content="rust is good, just not for me">
|
|
||||||
<meta property="og:description" content="Rust is the big new1 thing in just about every programming niche. web frameworks? of course there’s a Rust one! in fact, there’s dozens of them. command line tools? good luck finding one that isn’t written in Rust these days. databases? oops, all Rust!
|
|
||||||
all of this carcinisation2 has me feeling kind of left out, though. you see, i’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’s hyped up to be, that it’s actually a lot worse than everyone says it is, but… it really isn’t. it is a good programming language. a great one, in fact! i want to dig a little deeper into why i, personally, don’t vibe with it. (not very deep, mind you, because self-reflection is difficult as hell)">
|
|
||||||
<meta property="og:locale" content="en_gb">
|
|
||||||
<meta property="og:type" content="article">
|
|
||||||
<meta property="article:section" content="blog">
|
|
||||||
<meta property="article:published_time" content="2024-12-02T00:00:00+00:00">
|
|
||||||
<meta property="article:modified_time" content="2024-12-02T00:00:00+00:00">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary">
|
|
||||||
<meta name="twitter:title" content="rust is good, just not for me">
|
|
||||||
<meta name="twitter:description" content="Rust is the big new1 thing in just about every programming niche. web frameworks? of course there’s a Rust one! in fact, there’s dozens of them. command line tools? good luck finding one that isn’t written in Rust these days. databases? oops, all Rust!
|
|
||||||
all of this carcinisation2 has me feeling kind of left out, though. you see, i’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’s hyped up to be, that it’s actually a lot worse than everyone says it is, but… it really isn’t. it is a good programming language. a great one, in fact! i want to dig a little deeper into why i, personally, don’t vibe with it. (not very deep, mind you, because self-reflection is difficult as hell)">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta itemprop="name" content="rust is good, just not for me">
|
|
||||||
<meta itemprop="description" content="Rust is the big new1 thing in just about every programming niche. web frameworks? of course there’s a Rust one! in fact, there’s dozens of them. command line tools? good luck finding one that isn’t written in Rust these days. databases? oops, all Rust!
|
|
||||||
all of this carcinisation2 has me feeling kind of left out, though. you see, i’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’s hyped up to be, that it’s actually a lot worse than everyone says it is, but… it really isn’t. it is a good programming language. a great one, in fact! i want to dig a little deeper into why i, personally, don’t vibe with it. (not very deep, mind you, because self-reflection is difficult as hell)">
|
|
||||||
<meta itemprop="datePublished" content="2024-12-02T00:00:00+00:00">
|
|
||||||
<meta itemprop="dateModified" content="2024-12-02T00:00:00+00:00">
|
|
||||||
<meta itemprop="wordCount" content="810">
|
|
||||||
<meta name="referrer" content="no-referrer-when-downgrade" />
|
|
||||||
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: Verdana, sans-serif;
|
|
||||||
margin: auto;
|
|
||||||
padding: 20px;
|
|
||||||
max-width: 720px;
|
|
||||||
text-align: left;
|
|
||||||
background-color: #fff;
|
|
||||||
word-wrap: break-word;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #3273dc;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
text-decoration: none;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title span {
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
content {
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
padding: 2px 5px;
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #222;
|
|
||||||
display: block;
|
|
||||||
padding: 20px;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
font-size: 14px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight pre {
|
|
||||||
background-color: initial;
|
|
||||||
color: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight code {
|
|
||||||
background-color: unset;
|
|
||||||
color: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
border-left: 1px solid #999;
|
|
||||||
color: #222;
|
|
||||||
padding-left: 20px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
padding: 25px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #777;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
.errorlist {
|
|
||||||
color: #eba613;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ul.blog-posts {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li span {
|
|
||||||
flex: 0 0 130px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li a:visited {
|
|
||||||
color: #8b6fcb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
body {
|
|
||||||
background-color: #333;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #8cc2dd;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
background-color: #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea,
|
|
||||||
input {
|
|
||||||
background-color: #252525;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header><a href="/" class="title">
|
|
||||||
<h2>vulpine solutions</h2>
|
|
||||||
</a>
|
|
||||||
<nav><a href="/">Home</a>
|
|
||||||
|
|
||||||
|
|
||||||
<a href="/blog">Blog</a>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
<main>
|
|
||||||
|
|
||||||
<h1>rust is good, just not for me</h1>
|
|
||||||
<p>
|
|
||||||
<i>
|
|
||||||
<time datetime='2024-12-02' pubdate>
|
|
||||||
Dec 2, 2024
|
|
||||||
</time>
|
|
||||||
</i>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<content>
|
|
||||||
<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’s a Rust one! in fact, there’s dozens of them. command line tools? good luck finding one that <em>isn’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’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’s hyped up to be, that it’s actually a lot worse than everyone says it is, but… it really isn’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’t vibe with it. (not very deep, mind you, because self-reflection is difficult as <em>hell</em>)</p>
|
|
||||||
<h2 id="its-too-low-level">it’s too low-level</h2>
|
|
||||||
<p>starting off with the big one: <strong>Rust is a systems language.</strong> while it <em>also</em> works very well for web development, command line tools, and other software, it’s not what it was designed for. it was designed for scenarios where you can (and often need to!) squeeze as much performance as possible out of a system, where a garbage collector on its own would already not fit into the device’s memory, and where a string taking up any more space than its literal bytes is unacceptable.</p>
|
|
||||||
<p>meanwhile, when <em>i</em> used Rust, i just wrapped everything in an <code>Arc<RwMutex<T>></code><sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup> and called it a day, because i <em>don’t</em> care about performance all that much. HTTP and database latency already destroy any optimization i could do to the business logic, so why even bother?</p>
|
|
||||||
<h2 id="i-was-constantly-fighting-the-compiler">i was constantly fighting the compiler</h2>
|
|
||||||
<p>i’ll admit it: i didn’t really go out of my way to learn Rust. like every other language i’ve used, i just jumped in headfirst and started trying to rewrite my silly little programs into the silly little crab language. <strong>this was a mistake.</strong></p>
|
|
||||||
<p>Rust’s compiler is its strongest suit: it catches bugs that no C or C++ compilers can even <em>imagine</em> exist, and its borrow checker seems like dark magic at times. but what makes the compiler great for experienced Rust users makes it an absolute <em>pain</em> for people learning the language. other languages let you throw code at the wall and see what sticks; Rust won’t even let your code compile unless it works perfectly. this makes my learning process a lot more difficult, and as such, i never really learned more advanced Rust.</p>
|
|
||||||
<h2 id="macros-are-magic-but-not-the-good-kind">macros are magic, but not the good kind</h2>
|
|
||||||
<p>macros are <em>extremely</em> powerful. many of the libraries i was using heavily relied on them–some, like <code>sqlx</code> (no relation to <code>sqlx</code>, the Go library<sup id="fnref:4"><a href="#fn:4" class="footnote-ref" role="doc-noteref">4</a></sup>) are entirely built around them. they’re also a nightmare to reason with as an inexperienced rustacean.</p>
|
|
||||||
<p>i’m used to being able to ctrl-click on a function invocation to go directly to its implementation in other languages–Go, C#, and even Python all do this (well, as long as the Python package has type annotations, and you’re not relying on external ones). this just doesn’t work with macros, because the code is generated at compile time. it felt like i was feeding input into a black box and praying that whatever came out on the other side worked<sup id="fnref:5"><a href="#fn:5" class="footnote-ref" role="doc-noteref">5</a></sup>.</p>
|
|
||||||
<h3 id="types-for-days">types for days</h3>
|
|
||||||
<p>somewhat related to macros: some libraries like <a href="https://github.com/tokio-rs/axum">axum</a> generate <em>ridiculously</em> long type names, which, while funny, are impossible to actually parse. this didn’t make debugging my code any easier.</p>
|
|
||||||
<h2 id="conclusion-i-guess">conclusion, i guess</h2>
|
|
||||||
<p>i don’t really have any conclusion to draw from writing this. i guess my learning process just doesn’t mesh with how Rust works, and that’s why i bounced off of it.</p>
|
|
||||||
<p>i definitely think it’s worth thinking about this for <em>any</em> language–or any other <em>tool</em> in general, even–that you dislike. it’s honestly kind of depressing to be extremely negative about things without being able to articulate <em>why</em>. i’m sure i’ve annoyed plenty of friends by complaining about Rust or any other tool they like.</p>
|
|
||||||
<p>in fact, i should write a post like this for every language i dislike! Go, Elixir, maybe even PHP–well, maybe not that last one. it’s been so long since i last used it that i’m sure all my problems with it have been fixed at this point.</p>
|
|
||||||
<div class="footnotes" role="doc-endnotes">
|
|
||||||
<hr>
|
|
||||||
<ol>
|
|
||||||
<li id="fn:1">
|
|
||||||
<p>please ignore that it’s been stable for over 9 years. <a href="#fnref:1" class="footnote-backref" role="doc-backlink">↩︎</a></p>
|
|
||||||
</li>
|
|
||||||
<li id="fn:2">
|
|
||||||
<p><a href="https://en.wikipedia.org/wiki/Carcinisation">everything seems to evolve into crabs these days.</a> <a href="#fnref:2" class="footnote-backref" role="doc-backlink">↩︎</a></p>
|
|
||||||
</li>
|
|
||||||
<li id="fn:3">
|
|
||||||
<p>wait a second, does that mean i just used a reference-counting garbage collector? <a href="#fnref:3" class="footnote-backref" role="doc-backlink">↩︎</a></p>
|
|
||||||
</li>
|
|
||||||
<li id="fn:4">
|
|
||||||
<p><code>sqlx</code>, the Rust library that converts database rows to strongly typed structs using reflection magic (macros), not to be confused with <code>sqlx</code>, the Go library that converts database rows to strongly typed structs using reflection magic (the reflection package). they are somehow completely unrelated. <a href="#fnref:4" class="footnote-backref" role="doc-backlink">↩︎</a></p>
|
|
||||||
</li>
|
|
||||||
<li id="fn:5">
|
|
||||||
<p>this is, coincidentally, why i don’t use LLMs. <a href="#fnref:5" class="footnote-backref" role="doc-backlink">↩︎</a></p>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</content>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
<footer>Made with <a href="https://github.com/janraasch/hugo-bearblog/">Hugo ʕ•ᴥ•ʔ Bear</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
|
@ -1,252 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en-gb">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="Hugo 0.139.2">
|
|
||||||
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" />
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<link rel="shortcut icon" href="https://blog.vulpine.solutions/favicon.png" />
|
|
||||||
<title>Home | vulpine solutions</title>
|
|
||||||
<meta name="title" content="Home" />
|
|
||||||
<meta name="description" content="vulpine problems require vulpine solutions" />
|
|
||||||
<meta name="keywords" content="" />
|
|
||||||
|
|
||||||
|
|
||||||
<meta property="og:url" content="https://blog.vulpine.solutions/">
|
|
||||||
<meta property="og:site_name" content="vulpine solutions">
|
|
||||||
<meta property="og:title" content="Home">
|
|
||||||
<meta property="og:description" content="heya, i’m sam! this is my attempt at a blog which i will definitely update often, trust me.
|
|
||||||
i deliberately don’t really have a public online presence, but you can find me here:
|
|
||||||
codeberg: https://codeberg.org/u1f320/ (git) forgejo: https://code.vulpine.solutions/sam (self-hosted git) pronouns.cc: https://pronouns.cc/@sam (i made this site!) vulpine problems require vulpine solutions">
|
|
||||||
<meta property="og:locale" content="en_gb">
|
|
||||||
<meta property="og:type" content="website">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary">
|
|
||||||
<meta name="twitter:title" content="Home">
|
|
||||||
<meta name="twitter:description" content="heya, i’m sam! this is my attempt at a blog which i will definitely update often, trust me.
|
|
||||||
i deliberately don’t really have a public online presence, but you can find me here:
|
|
||||||
codeberg: https://codeberg.org/u1f320/ (git) forgejo: https://code.vulpine.solutions/sam (self-hosted git) pronouns.cc: https://pronouns.cc/@sam (i made this site!) vulpine problems require vulpine solutions">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta itemprop="name" content="Home">
|
|
||||||
<meta itemprop="description" content="heya, i’m sam! this is my attempt at a blog which i will definitely update often, trust me.
|
|
||||||
i deliberately don’t really have a public online presence, but you can find me here:
|
|
||||||
codeberg: https://codeberg.org/u1f320/ (git) forgejo: https://code.vulpine.solutions/sam (self-hosted git) pronouns.cc: https://pronouns.cc/@sam (i made this site!) vulpine problems require vulpine solutions">
|
|
||||||
<meta itemprop="datePublished" content="2024-12-02T00:00:00+00:00">
|
|
||||||
<meta itemprop="dateModified" content="2024-12-02T00:00:00+00:00">
|
|
||||||
<meta itemprop="wordCount" content="51">
|
|
||||||
<meta name="referrer" content="no-referrer-when-downgrade" />
|
|
||||||
|
|
||||||
<link rel="alternate" type="application/rss+xml" href="https://blog.vulpine.solutions/index.xml" title="vulpine solutions" />
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: Verdana, sans-serif;
|
|
||||||
margin: auto;
|
|
||||||
padding: 20px;
|
|
||||||
max-width: 720px;
|
|
||||||
text-align: left;
|
|
||||||
background-color: #fff;
|
|
||||||
word-wrap: break-word;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #3273dc;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
text-decoration: none;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title span {
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav a {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
content {
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
padding: 2px 5px;
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #222;
|
|
||||||
display: block;
|
|
||||||
padding: 20px;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
font-size: 14px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight pre {
|
|
||||||
background-color: initial;
|
|
||||||
color: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.highlight code {
|
|
||||||
background-color: unset;
|
|
||||||
color: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
border-left: 1px solid #999;
|
|
||||||
color: #222;
|
|
||||||
padding-left: 20px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
padding: 25px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #777;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
.errorlist {
|
|
||||||
color: #eba613;
|
|
||||||
font-size: small;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ul.blog-posts {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li span {
|
|
||||||
flex: 0 0 130px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.blog-posts li a:visited {
|
|
||||||
color: #8b6fcb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
body {
|
|
||||||
background-color: #333;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1,
|
|
||||||
h2,
|
|
||||||
h3,
|
|
||||||
h4,
|
|
||||||
h5,
|
|
||||||
h6,
|
|
||||||
strong,
|
|
||||||
b {
|
|
||||||
color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #8cc2dd;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
background-color: #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea,
|
|
||||||
input {
|
|
||||||
background-color: #252525;
|
|
||||||
color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helptext {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header><a href="/" class="title">
|
|
||||||
<h2>vulpine solutions</h2>
|
|
||||||
</a>
|
|
||||||
<nav><a href="/">Home</a>
|
|
||||||
|
|
||||||
|
|
||||||
<a href="/blog">Blog</a>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
<main>
|
|
||||||
<p>heya, i’m sam! this is my attempt at a blog which i will <em>definitely</em> update often, trust me.</p>
|
|
||||||
<p>i deliberately don’t really have a public online presence, but you can find me here:</p>
|
|
||||||
<ul>
|
|
||||||
<li>codeberg: <a href="https://codeberg.org/u1f320/">https://codeberg.org/u1f320/</a> (git)</li>
|
|
||||||
<li>forgejo: <a href="https://code.vulpine.solutions/sam">https://code.vulpine.solutions/sam</a> (self-hosted git)</li>
|
|
||||||
<li>pronouns.cc: <a href="https://pronouns.cc/@sam">https://pronouns.cc/@sam</a> (i made this site!)</li>
|
|
||||||
</ul>
|
|
||||||
<h6 id="_vulpine-problems-require-vulpine-solutions_"><em>vulpine problems require vulpine solutions</em></h6>
|
|
||||||
|
|
||||||
|
|
||||||
</main>
|
|
||||||
<footer>Made with <a href="https://github.com/janraasch/hugo-bearblog/">Hugo ʕ•ᴥ•ʔ Bear</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,34 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
||||||
<channel>
|
|
||||||
<title>Home on vulpine solutions</title>
|
|
||||||
<link>https://blog.vulpine.solutions/</link>
|
|
||||||
<description>Recent content in Home on vulpine solutions</description>
|
|
||||||
<generator>Hugo</generator>
|
|
||||||
<language>en-gb</language>
|
|
||||||
<copyright>sam, CC-BY-SA 4.0</copyright>
|
|
||||||
<lastBuildDate>Mon, 02 Dec 2024 00:00:00 +0000</lastBuildDate>
|
|
||||||
<atom:link href="https://blog.vulpine.solutions/index.xml" rel="self" type="application/rss+xml" />
|
|
||||||
<item>
|
|
||||||
<title>rust is good, just not for me</title>
|
|
||||||
<link>https://blog.vulpine.solutions/blog/rust-is-good-just-not-for-me/</link>
|
|
||||||
<pubDate>Mon, 02 Dec 2024 00:00:00 +0000</pubDate>
|
|
||||||
<guid>https://blog.vulpine.solutions/blog/rust-is-good-just-not-for-me/</guid>
|
|
||||||
<description><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></description>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<title>go's panics are fundamentally flawed</title>
|
|
||||||
<link>https://blog.vulpine.solutions/blog/go-panics-are-fundamentally-flawed/</link>
|
|
||||||
<pubDate>Tue, 05 Nov 2024 00:00:00 +0000</pubDate>
|
|
||||||
<guid>https://blog.vulpine.solutions/blog/go-panics-are-fundamentally-flawed/</guid>
|
|
||||||
<description><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></description>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<title>hello world!</title>
|
|
||||||
<link>https://blog.vulpine.solutions/blog/hello-world/</link>
|
|
||||||
<pubDate>Mon, 04 Nov 2024 00:00:00 +0000</pubDate>
|
|
||||||
<guid>https://blog.vulpine.solutions/blog/hello-world/</guid>
|
|
||||||
<description><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></description>
|
|
||||||
</item>
|
|
||||||
</channel>
|
|
||||||
</rss>
|
|
|
@ -1,2 +0,0 @@
|
||||||
User-Agent: *
|
|
||||||
Sitemap: https://blog.vulpine.solutions/sitemap.xml
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
||||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
||||||
<url>
|
|
||||||
<loc>https://blog.vulpine.solutions/blog/</loc>
|
|
||||||
<lastmod>2024-12-02T00:00:00+00:00</lastmod>
|
|
||||||
</url><url>
|
|
||||||
<loc>https://blog.vulpine.solutions/</loc>
|
|
||||||
<lastmod>2024-12-02T00:00:00+00:00</lastmod>
|
|
||||||
</url><url>
|
|
||||||
<loc>https://blog.vulpine.solutions/blog/rust-is-good-just-not-for-me/</loc>
|
|
||||||
<lastmod>2024-12-02T00:00:00+00:00</lastmod>
|
|
||||||
</url><url>
|
|
||||||
<loc>https://blog.vulpine.solutions/blog/go-panics-are-fundamentally-flawed/</loc>
|
|
||||||
<lastmod>2024-11-05T00:00:00+00:00</lastmod>
|
|
||||||
</url><url>
|
|
||||||
<loc>https://blog.vulpine.solutions/blog/hello-world/</loc>
|
|
||||||
<lastmod>2024-11-04T00:00:00+00:00</lastmod>
|
|
||||||
</url>
|
|
||||||
</urlset>
|
|
Loading…
Reference in a new issue