💾 Archived View for tilde.team › ~easeout › glog › 2020-08-02-golang-and-gloggery.gmi captured on 2024-05-26 at 15:18:08. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2020-09-24)

-=-=-=-=-=-=-

<- Glog

Next: gloggery Builds Atom

Previous: mosh and Quake

2 August 2020

Golang and gloggery

This glog is now being built by a little engine that can.

As usual, my impulse to do a small project turned into several days of research and waffling before really starting. During that time I settled on the Go language, learned a decent amount, but stopped short of the generics debate. Today was all about building, and coffee, and now I have a tiny static Gemini site generator named gloggery.

gloggery

gloggery expects one plain text file per post, named in a date-prefixed manner. It renders them out through a Go text template, which is just enough to print the date and back navigation. It also renders the index page with links to all the posts. An atom feed is a likely next step. (I would love feedback.)

Although the no-generics thing had me pining for a standard way to reverse a list, I had a great time with Go today. I like how small it is as a language. I like its focus on orthogonal pieces that are built bottom-up and connected uniformly.

The concurrency model feels good. Processes were once the unit of concurrency, and they communicated with pipes. One perspective says threads made processes heavier and more internally complex, and I'm inclined to agree. But just by being connected through channels, goroutines feel simpler, and well-adapted to having lots of cores. Still, I did wish for plain old async/await today.

Fast builds are great, and I respect their complete lack of compromise on that point. Pairing Go with entr for hot reloads was a nice workflow today.

The runner-up choice of language was Rust. I'm interested because it had such influence on my favorite language, Swift. But that will have to wait for another project.