A type-safe struct mapper and query builder for Go (using generics)
This library is the spiritual successor to the one we covered late last year, now with generics.
This library is the spiritual successor to the one we covered late last year, now with generics.
Ben Johnson is at it again.
LiteFS is a FUSE-based file system for replicating SQLite databases across a cluster of machines. It works as a passthrough file system that intercepts writes to SQLite databases in order to detect transaction boundaries and record changes on a per-transction level in LTX files.
I believe Ben was alluding to this (then unreleased) tool on his recent Ship It! appearance…
Testing distributed systems under hard failures like network partitions and instance termination is critical, but it’s also important we test them under less catastrophic conditions because this is what they most often experience. Comcast is a tool designed to simulate common network problems like latency, bandwidth restrictions, and dropped/reordered/corrupted packets.
It works by wrapping up some system tools in a portable(ish) way. On BSD-derived systems such as OSX, we use tools like
ipfw
andpfctl
to inject failure. On Linux, we useiptables
andtc
. Comcast is merely a thin wrapper around these controls.
TFW you come up with the perfect name for your open source project ✨
Matt Holt (creator of Caddy) gives a deep dive into how the web server works and some of the design decisions and patterns that make it reliable, extensible, and delightful.
One of the interesting things about the design of Caddy is that its core is just configuration management. It pushes out all other functionality into modules so that basically the only thing left in core is accepting and reacting to configuration changes.
Vaultless as in you do not need to manage a password vault.
Instead of storing your passwords in a vault it derives your password on the fly from your master password and supplied realm string (for example, resource URL).
How cool is that?! Here’s an example use:
gokey -p super-secret-master-password -r example.com
PocketBase is an open source Go backend, consisting of:
For docs and examples, head to pocketbase.io/docs
Rewind like video, see output in a pager, Vim-like keymaps, and more. “Viddy well, gopher. Viddy well.”
dns.toys is a DNS server that takes creative liberties with the DNS protocol to offer handy utilities and services that are easily accessible via the command line.
Provides world time, unit conversion, weather and more. All over DNS.
Connect’s creators call it a “better gRPC”, but I am in no position to evaluate that claim so I will leave it as an exercise for you. Here’s what they have to say about it:
Connect is production-ready — focused, simple, and debuggable — and it’s fully compatible with gRPC clients and servers. If you’re frustrated by the complexity and instability of today’s gRPC libraries, we think you’ll find Connect a breath of fresh air.
Go library out now. Connect for TypeScript is “coming soon”
This package wraps the graphql-go/graphql implementation to provide a “fluent” pattern for constructing GraphQL queries in Go. This can be valuable in situations where dynamic queries are desired: when the fields of a GraphQL query (or mutation) are not known until runtime. For most other use cases, plain query strings or a helper library such as this should be sufficient.
I wonder if this would change Mislav’s unpopular GraphQL/Go opinion…
David Crawshaw gave an excellent talk (at Go Northwest in 2018) on using SQLite (so hot right now) together with Go and how enjoyable/productive the combo is. Quite worthy of its ~30 minutes runtime.
The purpose of the template is to show:
- how to organize a project and prevent it from turning into spaghetti code
- where to store business logic so that it remains independent, clean, and extensible
- how not to lose control when a microservice grows
This guide is built on top of some examples from the book
Concurrency in Go
andGo Programming Language
Covering race conditions, mutexes, deadlocks, channels, patterns, and more.
Currently supports SQLite and CSV. MySQL and Postgres are on the roadmap. Built with Bubble Tea.
The second jq
alternative we’ve discovered this week! (first here)
jq
is hard to use. There are alternatives likefq
andzq
, but they still make you learn a new programming language. Im tired of learning new programming languages.
gq
is not optimized for speed, flexibility or beauty.gq
is optimized for minimal learning/quick usage.gq
understands that you don’t use it constantly, you use it once a month and then forget about it. So when you come back to it,gq
will be easy to relearn. Just use the builtin library just like you would any other go project and you’re done. No unfamiliar syntax or operations, or surprising limits. Thats it.
I don’t know if Go is a great fit for this use-case, but if you already know it well… makes sense.
Nice to see some efforts around standardizing MLOps. Here’s their high-level selling points:
On our episode with Brian Kernighan, I asked him if there were ever a situation in which he would advise you start a new program in C today. His response:
I think probably unless you are in one of these resource-constrained environments, clearly, right upfront, that you’re going to be resource-constrained and the improvement of hardware isn’t gonna rescue you in the next couple of years, I would not start with C. I really wouldn’t. And then it depends what is your application.
As if on queue, StackOverflow blogger Marcin Pasinski has done a comparison between C and Go in the quintessential resource-constrained environment. Oddly enough, no mention of TinyGo in the piece, but otherwise a solid analysis.
Hot off the press from our friend Ben Johnson:
Postlite is a network proxy to allow access to remote SQLite databases over the Postgres wire protocol. This allows GUI tools to be used on remote SQLite databases which can make administration easier.
The proxy works by translating Postgres frontend wire messages into SQLite transactions and converting results back into Postgres response wire messages. Many Postgres clients also inspect the
pg_catalog
to determine system information so Postlite mirrors this catalog by using an attached in-memory database with virtual tables. The proxy also performs minor rewriting on these system queries to convert them to usable SQLite syntax.
It appears that Ben is taking code contributions this time around, but only for bug & documentation fixes.
EaseProbe does 3 kinds of work:
The New Stack has a solid rundown of all the new hotness that shipped yesterday when Go 1.18 officially rolled out. Of course, if you’re a regular Go Time listener, you’re already well aware of both the headline features as well as the other cool stuff in this release.
HUBFS is a file system for GitHub and Git. Git repositories and their contents are represented as regular directories and files and are accessible by any application, without the application having any knowledge that it is really accessing a remote Git repository. The repositories are writable and allow editing files and running build operations.
So if you hubfs mnt
(on macOS/Linux), it will set up a file hierarchy inside /mnt
that follows this pattern: / owner / repository / ref / path
. Cool idea! It is affected by GitHub’s API rate limiting and I’m not sure if/how it syncs (commits) back to the remote repos…
Say good bye to learning new tools just to work with a different data format.
Dasel uses a standard selector syntax no matter the data format. This means that once you learn how to use dasel you immediately have the ability to query/modify any of the supported data types without any additional tools or effort.
Samuel Berthe:
This project have started as an experiment to discover generics implementation. It may look like Lodash in some aspects. I used to code with the awesome go-funk package, but it uses reflection and therefore is not typesafe.
As expected, benchmarks demonstrate that generics will be much faster than implementations based on reflect stdlib package. Benchmarks also shows similar performances to pure
for
loops.
Vikram Rangnekar:
GraphJin gives you an instant secure and fast GraphQL API without code. GraphQL is automagically compiled into an efficient SQL query. Use either as a library or a standalone service. Build your backend APIs 100X faster.
I have to zonk him for that “automagically”, but still looks like a cool project.
Not much has been written yet on how Go’s fuzzing system actually works, so I’ll talk a bit about that here. If you’d like to try it out, Getting started with fuzzing is a great tutorial.
Jay Conrod worked on Go 1.18’s fuzzing feature, so there’s very few people who could write a post as detailed and accurate as this. He also discussed fuzzing in detail with us on Go Time #187.