M3 and MacOS Setup

I'm back on the Mac platform. After a few years daily driving desktop Linux on my personal machine, I can safely say that Linux is the best server-side OS for stateless web applications. For desktop operating systems, MacOS and Windows are probably more productive. I need Adobe, I love MAMP, having the opportunity to use … Continue reading M3 and MacOS Setup

Go templates surprise me again, but I found a decent implementation

Up until tonight, I figured I could autoload a /layouts directory that contained multiple templates with a {{ block "main" . }} directive, then select which template I wanted to use at runtime using t.ExecuteTemplate(w, "layoutfile.tmpl", data). Nope. It turns out that the {{ block "main" . }} from unexecuted files will interfere with the … Continue reading Go templates surprise me again, but I found a decent implementation

Trying to recover Gorilla’s docs with godoc (and installing godoc)

Today I was trying to wire up flash messages to display an error if updating a task failed. Frameworks like Laravel, Django and Rails have always solved the problem of implementing flash messages for me. As I look at wiring up flash messages by hand for the first time, I can safely say that this … Continue reading Trying to recover Gorilla’s docs with godoc (and installing godoc)

Long-winded Go code for 404s and stuff

Too tired to write much. Also: keto pizza sucks. I had some in my fridge and cooked it tonight. Never again. What was I thinking? These tweets sum up my thoughts on Go tonight: https://twitter.com/tylerlwsmith/status/1735205079131840556 Pages really need an abstraction on top, and I don't know what that abstraction should look like yet. I'll postpone … Continue reading Long-winded Go code for 404s and stuff

Working from a todo list again: future toy projects and languages

It's been a long time since I was working from a todo list on one of my projects. The last time was probably SacMusic back in May. Ironically, my todo list is for my todo app in Go. So far my impressions of Go are mixed. I like the simplicity of the language and I … Continue reading Working from a todo list again: future toy projects and languages

Go’s website is open source & the template code is terrifying

A redditor pointed out that Go's marketing and doc sites are open source. What I looked at the marketing site, and what I saw behind the curtains was a lot. The marketing site's rendering code was a thing of nightmares. In lieu of a framework or templating engine, any non-trivial Go site must hand-wire commodity … Continue reading Go’s website is open source & the template code is terrifying

Composing Go Templates and html/template: Everything I’ve learned

I've officially spent two weeks digging into Go templates. I'm not sure why I felt like it was so important to understand deeply. There are better options out there like templ which I'm sure I'll enjoy more. Hell, it comes with autocomplete! But I suffered through html/template anyway, trying to understand go:embed, parsing globs, why … Continue reading Composing Go Templates and html/template: Everything I’ve learned

Go templates are still a {{ block “er” . }}

Templating was not where I anticipated getting stuck in Go. I have so much experience with Hugo! Hugo does a lot of the dirty work though, and my mental model is just not yet there with Go templates and the html/template package API. While on a Reddit post about templates, I discovered my init functions … Continue reading Go templates are still a {{ block “er” . }}