Go Icon

Go

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

Drew Devault drewdevault.com

Generics aren’t ready for Go

Have you ever seen someone write something to the effect of “I would use Go, but I need generics”? Perhaps we can infer from this that many of the people who are pining after generics in Go are not, in fact, Go users. The inertia of “what I’m used to” comes to a violent stop when they try to use Go. People affected by this frustration interpret it as a problem with Go, that Go is missing some crucial feature - such as generics. But this lack of features is itself a feature, not a bug.

read more

Martin Olsansky medium.com

The world’s easiest introduction to WebAssembly with Golang for JS developers

A cool/fun intro to Wasm where you build a game for cats (catch the red laser dot) completely in Go. The fact that WASM is still considered a MVP (MAP) and that you create a game like this, without writing a single line of JS, is amazing! CanIUse is already fully green, there is nothing stopping you from building WASM powered websites and apps.

read more

Manish R Jain blog.dgraph.io

Why the Dgraph team chose Badger over RocksDB

This blog post is about Badger, the key-value database that makes it all happen under the hood, housing all Dgraph data, including Raft logs. There are many key-value store options in Go-land. Still, the Dgraph team decided to roll their own solution 18 months back. Was it a bad case of NIH? A good idea? Would they do it all over again? This article answers those questions in-depth.

read more

GitHub github.com

A simple web server for serving static GitHub Pages locally

This is useful for making sure things look right before pushing your content up to GitHub for serving. It’s better than python -m http.server and the like because it handles lack of file extensions and absolute paths better. It doesn’t support Jekyll-based GitHub pages, but it will take your Markdown files and send them off to api.github.com/markdown for character-perfect rendering.

read more

Go github.com

Turn any program that uses STDIN/STDOUT into a WebSocket server

WebSocket-capable applications can now be built very easily. As long as you can write an executable program that reads STDIN and writes to STDOUT, you can build a WebSocket server. Do it in Python, Ruby, Perl, Bash, .NET, C, Go, PHP, Java, Clojure, Scala, Groovy, Expect, Awk, VBScript, Haskell, Lua, R, whatever! No networking libraries necessary. Stuff already built with this include a real-time Linux stats dashboard, an arbitrary REPL in the browser, and a tool that retrieves SQL data from a server with LiveCode. (Use at your own risk 😈)

read more

Russ Cox research.swtch.com

Houston, we have a software dependency problem

Dig in as Russ Cox goes deep on our software dependency problem. For decades, discussion of software reuse was far more common than actual software reuse. Today, the situation is reversed: developers reuse software written by others every day, in the form of software dependencies, and the situation goes mostly unexamined. … Software dependencies carry with them serious risks that are too often overlooked. The shift to easy, fine-grained software reuse has happened so quickly that we do not yet understand the best practices for choosing and using dependencies effectively, or even for deciding when they are appropriate and when not. My purpose in writing this article is to raise awareness of the risks and encourage more investigation of solutions.

read more

GitHub github.com

Run your GitHub actions locally

Why might you want to do this? Two reasons: Fast Feedback - Rather than having to commit/push every time you want test out the changes you are making to your main.workflow file (or for any changes to embedded GitHub actions), you can use act to run the actions locally. Local Task Runner - I love make. However, I also hate repeating myself. With act, you can use the GitHub Actions defined in your main.workflow file to replace your Makefile!

read more

Go robustperception.io

Optimising startup time of Prometheus 2.6.0 with pprof

Brian Brazil: The informal design goal of the Prometheus 2.x TSDB startup was that it should take no more than about a minute. Over the past few months there’s been reports of it taking quite a bit more than this, which is a problem if your Prometheus restarts for some reason. Almost all of that time is loading the WAL (write ahead log), which are the samples in the last few hours which have yet to be compacted into a block. I finally got a chance to dig into this at the end of October, and the outcome was PR#440 which reduced CPU time by 6.5x and walltime by 4x. Let’s look at how I arrived at these improvements. I’ve been meaning to get more familiar with pprof, the Go profiling tool, as my job revolves around working on and around Go microservices. My team has been able to see the impact of the Go experts who can quickly find issues buried in a stack of profiles collected on a service. Brian’s post is a great example of 1) identifying the an issue, 2) diagnosing said issue and 3) observing the implemented improvements using pprof. His parting paragraph is particularly insightful, specifically: I did spend quite a bit of time pouring over the code, and had several dead ends such as removing the call to NumSamples, doing reading and decoding in separate threads, and a few variants of how the processWALSamples sharding worked Profiling and optimization is a mix of knowing your codebase and being able to identifying false leads. A tool like pprof is invaluable when identifying both issues and improvements in a measurable way.

read more

Johan Brandhorst grpc.io

The state of gRPC in the browser

Front-enders should check this out! Johan Brandhorst reviews the history of gRPC in the browser, the state of things today, and thoughts on the future of gRPC-Web. gRPC-Web is an excellent choice for web developers. It brings the portability, performance, and engineering of a sophisticated protocol into the browser, and marks an exciting time for frontend developers! So far the benefits have largely only been available to mobile app and backend developers, whilst frontend developers have had to continue to rely on JSON REST interfaces as their primary means of information exchange. However, with the release of gRPC-Web, gRPC is poised to become a valuable addition in the toolbox of frontend developers.

read more

Kubernetes tilt.build

Local Kubernetes development without the stress

Tilt makes it possible to develop all your microservices locally in Kubernetes while collaborating with your team. You define a Tiltfile that describes how your services fit together (which is supposed to be pretty straight forward if you already have a Dockerfile and a Kubernetes config), then share it with your team. Everyone runs tilt up and the app is up and running on their localhost. No more “it worked on my machine” – everything runs in containers so the right dependencies are always there. Tilt updates with container optimization tricks & best practices, so that even complex projects update in seconds.

read more

The Changelog The Changelog #322

There and back again (Dgraph's tale)

This week we talk with Manish Jain about Dgraph, graph databases, and licensing and re-licensing woes. Manish is the creator and founder Dgraph and we talked through all the details. We covered what a graph database is, the uses of a graph database, and how and when to choose a graph database over a relational database. We also talked through the hard subject of licensing/re-licensing. In this case, Dgraph has had to change their license a few times to maintain their focus on adoption while respecting the core ideas around what open source really means to developers.

read more

adrienjt admiralty.io

Introducing Multicluster-Controller

Last week, Admiralty open-sourced multicluster-controller, a Go library for building hybrid and multicloud Kubernetes operators. It is the equivalent of operator-sdk or kubebuilder, but for multiple clusters. It is actually a thin layer around parts of controller-runtime, the library that powers kubebuilder. It can be used to control custom resources (defined by CRDs) across clusters.

read more

Command line interface github.com

A tool for writing Bash pipes with instant live preview

Meet up a.k.a. the Ultimate Plumber: The main goal of the Ultimate Plumber is to help interactively and incrementally explore textual data in Linux, by making it easier to quickly build complex pipelines, thanks to a fast feedback loop. This is achieved by boosting any typical Linux text-processing utils such as grep, sort, cut, paste, awk, wc, perl, etc., etc., by providing a quick, interactive, scrollable preview of their results.

read more

Go blog.golang.org

Which companies are using Go and how they are using it?

If you want to see what the landscape is of companies who are using Go, spread the word and encourage folks to participate in the 2018 Go company questionnaire. On the Go blog: Please help by participating in a 7-minute company questionnaire. Who? If you are in a position to share details like “company name,” “if your company is hiring Go developers,” and “reasons your team or company adopted Go” then please help us by taking this company questionnaire. We only need one response per company (or per department for larger companies). If you aren’t the right person, please forward this onto the right person at your company.

read more

Go github.com

A high-performance PHP app server, load balancer, and process manager

RoadRunner is an open source (MIT licensed), high-performance PHP application server, load balancer and process manager. It supports running as a service with the ability to extend its functionality on a per-project basis. RoadRunner is written in Go, and can be used to replace the class Nginx+FPM setup, boasting “much greater performance”. I’d love to see some benchmarks. Better yet, I’d love to see someone use this in production for a bit and write up their experience.

read more

0:00 / 0:00