Go Icon


Go is a programming language built to resemble a simplified version of the C programming language.
526 Stories
All Topics

Go github.com

jq but using Go instead

The second jq alternative we’ve discovered this week! (first here)

jq is hard to use. There are alternatives like fq and zq, 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.

The Overflow Icon The Overflow

Comparing Go vs C in embedded applications

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.

Ben Johnson github.com

A Postgres wire compatible SQLite proxy

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.

Go Time Go Time #222

Making the command line glamorous

This week we’re bringing The Changelog to Go Time — we had an awesome conversation with Toby Padilla, Co-Founder at Charm where they’re building tools to make the command line glamorous. Toby and the team at Charm have gone “all in” on Go — all of Charm is written in Go. They moved to Go from other languages, saying “Go is the answer to building these type of tools.” And even on this episode Toby says “I love Rust, it’s really cool, it’s a super-exciting language, but I jumped ship. I wanna be more productive, I wanna use all the fun toys, and so I started doing Go.” Clearly this episode will be in good company here on Go Time.

We talk about the state of the art, the next big thing happening on the command line and in ssh-land. They have an array of open source tooling to build great apps for the terminal and Charm Cloud to power a new generation of CLI apps. We talk through all their tooling, where things are headed for CLI apps, the focus and attention of their team, and what’s to come in bringing glamor to the command line.

GitHub github.com

HUBFS – a file system for GitHub

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…

Go Time Go Time #220

Bob Logblaw Log Blog

Ed Welch joins Mat and Jon to discuss logging. They explore the different options for logging in Go, and discuss what data is worth including. Everything from log levels, formats, non-structured vs structured logs, along with common gotchas and good practices when dealing with logs at scale.

Samuel Berthe github.com

A Lodash-style Go library using generics

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.

0:00 / 0:00