<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>smantics</title>
    
    
    
    <link>https://blog.smantic.dev/</link>
    <description>Recent content on smantics</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Sun, 29 Oct 2023 21:10:51 -0500</lastBuildDate>
    
	<atom:link href="https://blog.smantic.dev/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>dotenv</title>
      <link>https://blog.smantic.dev/posts/dotenv/</link>
      <pubDate>Sun, 29 Oct 2023 21:10:51 -0500</pubDate>
      
      <guid>https://blog.smantic.dev/posts/dotenv/</guid>
      <description>
        
          
          
          
        
        
        
          I recently submitted a PR to an open source project, a CLI tool. I stumbled upon a few requests for the maintainer to add support of parsing an .env file while invoking the CLI.
I find this desire ridiculous. And there is no shortage of this desire in other projects.
Should every application parse a .env file for configuration? Obviously, no. We all ready have plenty of convenient ways of automatically setting env vars.
          
        
        </description>
    </item>
    
    <item>
      <title>housekeeping updates</title>
      <link>https://blog.smantic.dev/posts/updates-10-23/</link>
      <pubDate>Sun, 15 Oct 2023 17:51:33 -0500</pubDate>
      
      <guid>https://blog.smantic.dev/posts/updates-10-23/</guid>
      <description>
        
          
          
          
        
        
        
          Hello! Been about 6 mo since I posted a blog, wanted to post some housekeeping updates.
Thankfully a maintainer has been found for all the gorilla libraries. As they make changes to gorilla I will encourage others to continue using the main repo so that I do not have to any longer maintain my fork and maybe eventually remove my fork completely. I plan on revamping my site including moving away from hugo completely, maybe a custom solution for me.
          
        
        </description>
    </item>
    
    <item>
      <title>gorilla</title>
      <link>https://blog.smantic.dev/posts/gorilla/</link>
      <pubDate>Sat, 21 Jan 2023 18:27:27 -0600</pubDate>
      
      <guid>https://blog.smantic.dev/posts/gorilla/</guid>
      <description>
        
          
          
          
        
        
        
          Gorilla maintainers have decided to shutter the doors to the project and archive the gorilla repositories. The maintainers are signaling that there will no future development on the projects, and are encouraging the community to make and maintain forks of the gorillia repositories. If a critical issue were to arise in one of the gorilla projects, a zero day or other bug, it is very unlikely that the fix for said issue will make it to the github.
          
        
        </description>
    </item>
    
    <item>
      <title>x/slog</title>
      <link>https://blog.smantic.dev/posts/slog/</link>
      <pubDate>Fri, 09 Dec 2022 21:57:50 -0600</pubDate>
      
      <guid>https://blog.smantic.dev/posts/slog/</guid>
      <description>
        
          
          
          
        
        
        
          golang.org/x/exp/slog is a new experimental package implementing a structured logger. Originating from this proposal it aims to get a structured logging library into the stdlib.
If you&amp;rsquo;re not familiar with structured logging. It is, generally, the superior way to do logging. The idea is just to add some structure to the log lines in the form of key value pairs. Typical structure is usually either JSON format, or simply separated by a space.
          
        
        </description>
    </item>
    
    <item>
      <title>gopath is not deprecated</title>
      <link>https://blog.smantic.dev/posts/gopath-is-not-deprecated/</link>
      <pubDate>Fri, 09 Dec 2022 21:08:24 -0600</pubDate>
      
      <guid>https://blog.smantic.dev/posts/gopath-is-not-deprecated/</guid>
      <description>
        
          
          
          
        
        
        
          Maybe you&amp;rsquo;ve heard someone say something like;
&amp;ldquo;Gopath is deprecated, use go modules&amp;rdquo;.
While what they mean to say is true, that is developing in gopath mode is deprecated. When interpreted literally this statement is not true. And very likely confuses new comers to go. Lets peel back a layer of the onion and understand exactly what it is we mean to say.
The action of developing inside of Gopath and not using modules is deprecated.
          
        
        </description>
    </item>
    
    <item>
      <title>dependency injection</title>
      <link>https://blog.smantic.dev/posts/dependency-injection/</link>
      <pubDate>Tue, 21 Jun 2022 02:08:27 -0500</pubDate>
      
      <guid>https://blog.smantic.dev/posts/dependency-injection/</guid>
      <description>
        
          
          
          
        
        
        
          In go Dependency Injection is a slightly different way to pass arguments to your function.
It&amp;rsquo;s not a &amp;lsquo;hack&amp;rsquo; or dangerous. It&amp;rsquo;s not cargo cult programming. It&amp;rsquo;s not complex. It can be done without a framework. You don&amp;rsquo;t have to use it. But it will make your life easier. Injection # The pinnacle example for dependency injection is when writing http handler functions using net/http.
In go a function that handles http requests looks like this:
          
        
        </description>
    </item>
    
    <item>
      <title>errors</title>
      <link>https://blog.smantic.dev/posts/errors/</link>
      <pubDate>Mon, 24 Jan 2022 18:59:48 -0600</pubDate>
      
      <guid>https://blog.smantic.dev/posts/errors/</guid>
      <description>
        
          
          
          
        
        
        
          Runtime errors are a bit different in Go compared to other languages. Go lacks the familiar error handling like try/catch. In Go errors are values like any other kind of type in go. Because of this we often see signatures that are like
func DoSomething() error or func FetchSomething() (results, error)
And our functions tend to be composed of a lot of
if err != nil { return err } We call this &amp;ldquo;bubbling up&amp;rdquo; the error, as the error is bubbled up the call stack until we reach a point where we can make a decision about the error.
          
        
        </description>
    </item>
    
    <item>
      <title>context</title>
      <link>https://blog.smantic.dev/posts/context/</link>
      <pubDate>Thu, 09 Dec 2021 18:13:26 -0600</pubDate>
      
      <guid>https://blog.smantic.dev/posts/context/</guid>
      <description>
        
          
          
          
        
        
        
          If you&amp;rsquo;re new to Go you might have seen some functions like
func Foo(ctx context.Context) error Context is a pattern frequently used to help manage the life cycle of complex systems. We see it often in Go as its considered good practice, is part of the well vetted standard library, and is extremely useful.
In go we have context.Context which is an interface like 1
type Context interface { Deadline() (deadline time.
          
        
        </description>
    </item>
    
    <item>
      <title>injection with closures</title>
      <link>https://blog.smantic.dev/posts/closures/</link>
      <pubDate>Sat, 27 Nov 2021 13:52:39 -0600</pubDate>
      
      <guid>https://blog.smantic.dev/posts/closures/</guid>
      <description>
        
          
          
          
        
        
        
          In languages that have first class functions we can define closures that lexically capture values in the scope that they are defined in.
package main import &amp;#34;fmt&amp;#34; func main() { b := true closure := func() error { err := fmt.Errorf(&amp;#34;something bad happened!!&amp;#34;) if b { return err } return nil } b = false err := closure() fmt.Printf(&amp;#34;%v\n&amp;#34;, err) } In this example we lexically capture b in our closure.
          
        
        </description>
    </item>
    
    <item>
      <title>service desks</title>
      <link>https://blog.smantic.dev/posts/service-desks/</link>
      <pubDate>Fri, 26 Nov 2021 15:25:18 -0600</pubDate>
      
      <guid>https://blog.smantic.dev/posts/service-desks/</guid>
      <description>
        
          
          
          
        
        
        
          don&amp;rsquo;t use service desks as a means of collaboration inside of an organization.
Service, or Help Desks are a system that have been in use since the beginning of the internet. We often see companies that deliver software to large user bases have a help desk that is ran by a support team. This brings the company numerous benefits including:
Cost effective support for confused consumers. Better understanding of the software to its consumers.
          
        
        </description>
    </item>
    
    <item>
      <title>struct-to-map</title>
      <link>https://blog.smantic.dev/posts/struct-to-map/</link>
      <pubDate>Tue, 26 Oct 2021 21:02:11 -0500</pubDate>
      
      <guid>https://blog.smantic.dev/posts/struct-to-map/</guid>
      <description>
        
          
          
          
        
        
        
          Occasionally in go we want convert our structured data into an unstructured format, such as a map[string]interface{}
for struct like:
type Foo struct { A Bar `json:&amp;#34;a&amp;#34;` B Bar `json:&amp;#34;b&amp;#34;` C Bar `json:&amp;#34;c&amp;#34;` D Bar `json:&amp;#34;d&amp;#34;` E Bar `json:&amp;#34;e&amp;#34;` F int `json:&amp;#34;f&amp;#34;` G uint `json:&amp;#34;g&amp;#34;` H string `json:&amp;#34;h&amp;#34;` } type Bar struct { Bar string `json:&amp;#34;bar&amp;#34;` } There are a couple ways we can convert it into a map.
manually func base(foo Foo) map[string]interface{} { result := make(map[string]interface{}) result[&amp;#34;A&amp;#34;] = foo.
          
        
        </description>
    </item>
    
    <item>
      <title>reddit</title>
      <link>https://blog.smantic.dev/posts/reddit/</link>
      <pubDate>Sat, 18 Sep 2021 16:05:12 -0500</pubDate>
      
      <guid>https://blog.smantic.dev/posts/reddit/</guid>
      <description>
        
          
          
          
        
        
        
          Reddit is a link aggregator and thats all it should be.
Through a system of anonymity and fake internet points reddit brings attention to things that people generally find interesting or important around a particular topic.
Often times people treat reddit as if it were a discussion board. They will get into heated debates surrounding a particular topic in the comment sections. Don&amp;rsquo;t do this. It&amp;rsquo;s naive. You are trying to convince a random person behind a keyboard of a particular viewpoint.
          
        
        </description>
    </item>
    
    <item>
      <title>readme</title>
      <link>https://blog.smantic.dev/readme/</link>
      <pubDate>Thu, 12 Aug 2021 20:23:41 -0500</pubDate>
      
      <guid>https://blog.smantic.dev/readme/</guid>
      <description>
        
          
          
          
        
        
        
          I want to explore and understand the truth created from the languages that make up software, thus the name for the blog, semantics; the study of truth.
          
        
        </description>
    </item>
    
    <item>
      <title>retro-gaming-devices</title>
      <link>https://blog.smantic.dev/posts/retro-gaming/</link>
      <pubDate>Wed, 07 Apr 2021 17:37:50 -0500</pubDate>
      
      <guid>https://blog.smantic.dev/posts/retro-gaming/</guid>
      <description>
        
          
          
          
        
        
        
          I loved playing pokemon games as kid. Problem is that I still love playing them. I&amp;rsquo;ve played pokemon games on emulators at my PC, but sitting at computer after I just sat there all day for my job doesn&amp;rsquo;t really capture the joys of my childhood.
So I&amp;rsquo;ve started to trying to find a handheld device that will let me re-experience the glory days of the game boy and the Nintendo DS.
          
        
        </description>
    </item>
    
    <item>
      <title>dual-booting</title>
      <link>https://blog.smantic.dev/posts/dual-boot/</link>
      <pubDate>Tue, 06 Apr 2021 22:32:51 -0500</pubDate>
      
      <guid>https://blog.smantic.dev/posts/dual-boot/</guid>
      <description>
        
          
          
          
        
        
        
          This is a guide to a bare metal dual boot of Windows 10 and Ubuntu. No emulation, or virtualization. Most of this guide comes from my personal experiance over several years of having a dual boot install, any pain points that I highlight are because I have experianced them myself. Obiviously, this is not a complete resource of all the information you might need to do this, but this post does have all the information you mighy need.
          
        
        </description>
    </item>
    
  </channel>
</rss>