Golang Digest
2.55K subscribers
164 photos
1 video
190 links
Everything about Go: news, articles, tools, language changes, etc.

#go #golang #concurrency #postgres #database #db
Download Telegram
Hyrum's Law in Golang πŸ€“

The author found a comment in the code: "Hyrum's Law" and he had to figure out what it meant and what kind of law it was.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
2πŸ‘4πŸ‘Ύ2
Go Back To The Future ❀️

An interesting talk from Ron Evans covers the following topics:
- Some Golang history
- Flying a drone w/ face detection
- wasmvision + ollama vision models from WebAssembly
- "Talking Heads From The Year 2053" uncensored LLMs actual talking heads

https://www.youtube.com/watch?v=T-U98y-mlIs

#go #video #go #go@digest_golang #golab #conference
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ”₯4πŸ‘2❀1
Constraints in Go πŸ€“

This is the fourth article from the author's series of articles about generics in Go (here are articles number one, two, three). The author explains what constraints are and how to use them in the context of generics.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ”₯6❀4πŸ‘2
Build ACID database with this one neat trick (atomic PutIfAbsent) 🀑

Very interesting and deeply technical article - Phil Eaton, a database and database product developer, shows a simple implementation of a serverless, ACID-enabled database using the Delta Lake protocol.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯6πŸ‘3
GoMLX: ML in Go without Python πŸ€“

In the previous article, the author explained how machine learning can be applied to Go using Python. In this article, the author decided to try to solve the same problems, but using only Go.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘8πŸ”₯3
βœ… Investigating Golang Memory Leak with Pprof

Discover pprof's capabilities in tackling bugs and memory leaks, with a real-life case study examining its impact on performance.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘7πŸ”₯4
Getting a pointer to a constant in Go πŸ‘Ύ

In Go, sometimes you need to get a pointer to a constant value. The topic is simple, but the author explains all the approaches well, and for dessert he shows an interesting life hack that is used in the Kubernetes source code.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘4πŸ”₯3
Weak Pointers in Go: Why They Matter Now πŸ’ͺ

Weak pointers are pointers that do not block the garbage collector and allow it to free the memory that such a pointer points to.
This is an interesting and useful concept that, if used correctly, allows you to optimize the operation of a program.
Smart pointers are expected in Go in version 1.24, but we can already see how they work.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘6πŸ”₯3
Why Golang slices still surprise me πŸ€“

A slice is a basic concept of the Go language that can be represented in two ways: either as a dynamic array or as a fat pointer. The author explains what problems this entails and how to solve them.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘5❀3πŸ”₯1
Suite smells: undertesting and overtesting🀑

This is the second in a three-part series of excerpts from the book, focusing on test suites in Go, what kind of problems you might find with them, and some tips on how to fix them.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ”₯3πŸ‘2
Run a Simple Go Web Service on NixOS ❀️

NixOS is a Linux distribution created for various devops tasks. The author explains why he chose this system to deploy his applications and why he refused to use Ansible and Docker. Finally, the author shows how to run a simple Go application on NixOS.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘5πŸ”₯3πŸ‘Ž1
Disable Slog Messages in Go Tests πŸ€“

slog package was added to Go 1.23, which improves logging capabilities and allows you to abandon many third-party solutions.
In this short note, the author provides code that makes a mock logger for tests. Bookmark it!

Link to the note

#go #go@digest_golang #note #note@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ”₯9❀3❀‍πŸ”₯1
Go Protobuf: The new Opaque API πŸ€“

A new article in the official go blog talks about a new way to generate .pb.go files when working with grpc - Opaque API. The new API allows you to use less memory and use it more efficiently, adds laze decoding optimizations, optimizes work with pointers, and adds many other useful changes.
A must read if you use grpc in your projects!

Link to the article

#go #go@digest_golang #note #note@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘7πŸ”₯5
Coming in Go 1.24: testing/synctest experiment for time and concurrency testing ❀️

Go 1.24, which will be released in February, will include the testing/synctest package, which greatly improves timing testing. The package contains a Run function that allows testing code in a "bubble". The time inside the "bubble" is controlled by the Go runtime.

In this article, the author shows what problems this package will fix and how it will help with testing parallel code.

Link to the article

#go #go@digest_golang #note #note@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ”₯6πŸ‘4πŸ₯°1
Golang 1.24 is looking seriously awesome 🀑

This article provides a brief overview of the main new features that will be added in the new Go 1.24 version.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1❀3πŸ”₯3πŸ₯°3
Go's Weird Little Iterators πŸ€“

In this article, a former Google developer discusses the iterator implementation in Go 1.23 and compares it to iterator implementations in languages ​​such as C++, Java, and Rust. The article provides detailed examples and analysis of Go's iteration mechanisms and their implications for developers.

Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ”₯4πŸ‘2❀1
Interfaces in Go: Simplified with a silly Analogy 🀑

Inspired by my niece's antics, I used a silly (yet effective) analogy to explain interfaces in Go. If you've ever been puzzled by this concept, check this out. It might just click for you!


Link to the article

#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ”₯5πŸ‘4
βœ… GoReleaser v2.5

One of the most popular libraries that simplifies the release process for Go has been updated - GoReleaser! The new version reaches a new level: the author added support for two increasingly popular languages: Rust and Zig!

List of all changes

#go #go@digest_golang #tool #tool@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1πŸ‘6❀3πŸ”₯3
Golang Error Handling β€” Improvised (Must Pattern) πŸš€πŸš€

Error handling is a core part of any programming language. However, Go’s approach to error handling often leads developers to write verbose, repetitive code β€” a sentiment shared by many in the Go community. Let’s explore why this redundancy happens, the limitations it brings, and what potential solutions could look like.

Link to the article

#go #go@digest_golang #article #article@digest_golang
1πŸ”₯5πŸ‘2πŸ‘Ž2