#golang
GoLang Goes Retro: Compiler Now Supports Morse Code | TechCrunch
Discussions: https://discu.eu/q/https://tsrn.ch/tAa6Gfj
GuardLlama - Open-source WireGuard VPN with ad-blocking capabilities
https://guardllama.net/blog/guardllama-intro/
Discussions: https://discu.eu/q/https://guardllama.net/blog/guardllama-intro/
As software developers, what can we learn from The Sound of Silence?
#golang #go #reaction #music #video #softwaredevelopment #programming
Frustrated with the quality of our cell based internet lately I literally spent two days downtime writing a utility for scraping data asynchronously from the cell modem and charting it in a time series to help adjust the antenna to be more on-axis. It will never be ideal due to our range but it's been real bad lately. I successfully used it in a POC test to adjust the antenna with immediate feedback. #golang

#golang seems to be a great ecosystem, but for some reason I‘ve failed liking it so far, despite all the great things that Go offers.
I briefly discussed that with my co-worker Elisa (who knows way more about the more recent PLs than me) and somehow ended up giving Rust a try.
https://mmhaskell.com/rust was a great read so far. Let’s see if all the horror stories about using low level crypto libraries to validate a JWT are true :-)

Preventing breaking changes to your database with Atlas
https://atlasgo.io/blog/2023/03/31/preventing-breaking-changes
Discussions: https://discu.eu/q/https://atlasgo.io/blog/2023/03/31/preventing-breaking-changes
Do we have any vscode plugin to convert json to struct in Go?
https://transform.tools/json-to-go
Discussions: https://discu.eu/q/https://transform.tools/json-to-go
I don't use #golang concurrency patterns that often but when I need them, it feels like I am starting from zero again.
So I found this amazing cheat sheet, that safes me a lot of time.
https://github.com/lotusirous/go-concurrency-patterns
It also contains playground links for each concurrency pattern.

この記事を受けて,拙文で replace ディレクティブの説明に追記した。つか,いまどき replace ディレクティブを使う人はおらんと思ってたよw #golang
>Go のモジュール管理【バージョン 1.17 改訂版】|Spiegel https://zenn.dev/spiegel/articles/20210223-go-module-aware-mode #zenn
#golang よい記事
>Goのローカルパッケージのインポートについて|NoboNobo https://zenn.dev/nobonobo/articles/1d4afb9f4e8873 #zenn
When you sort your customers names in #Golang or any other language, please use your local collation system.
Let's say you have:
{"canaan", "Udo", "Óscar", "arudz", "bao", "Carlito", "Zoe","Álex"}
Standard string sorting:
[arudz bao canaan Carlito Udo Zoe Álex Óscar]
They are sorted by their precedence in the UTF-8 table. Ouch!
But we want this:
[Álex arudz bao canaan Carlito Óscar Udo Zoe]
German (in my location) Collation comes to save the day
https://go.dev/play/p/rKqQRfYQJ4p
From Unknown to Expert: Golang Statements You Need to Know
https://blog.canopas.com/from-unknown-to-expert-golang-statements-you-need-to-know-a1ac97213c04
Discussions: https://discu.eu/q/https://blog.canopas.com/from-unknown-to-expert-golang-statements-you-need-to-know-a1ac97213c04
Working on an #opensource #reverseproxy for users with basic to no networking background. Powered by #golang 🙌


Peeps - what's your #weekendwarrior #sundaysideproject? Maybe building your own chat app in a day using #Flutter, Pusher, and a #Golang backend? 💯 Follow along with Wilberforce Uwadiegwu in "Live Chat With Pusher Using Provider", available exclusively here: https://www.kodeco.com/36641486-live-chat-with-pusher-using-provider
Kubeshark Slack integration: Alert based on Kubernetes network events
Discussions: https://discu.eu/q/https://youtu.be/XtctdMAvhCE
Kivi - Distributed dynamo-style database for educational purposes written in Go
https://github.com/maxpoletaev/kivi
Discussions: https://discu.eu/q/https://github.com/maxpoletaev/kivi
SwissMap: A smaller, faster Golang Hash Table https://www.dolthub.com/blog/2023-03-28-swiss-map/ #golang #devops

@galdor @EMacAdie Emacs with Eglot (which is now part of Emacs) is a perfect #Golang IDE. You have the same Code intelligence, formatting, linting etc. because they are provided by #Go tooling, not the IDE.
I used to use Jetbrains Goland and VSCode in the past. They are very good but come at a huge price tag (money- or otherwise).
Emacs allows me to quickly jump between many projects during the day and never loose context. I often have to fix bugs, grep the code, fix it, commit it and deploy it - all from #Emacs.
Debugging and Resolving Issues with Go and the sqlite3 Library
https://jtarchie.com/posts/2023-03-29
Discussions: https://discu.eu/q/https://jtarchie.com/posts/2023-03-29
I put together a basic tutorial of Go on my blog with examples for red teams and pen testers.
https://unclesp1d3r.github.io/posts/2023/03/go-programming-language-basic-concepts-and-syntax/
Discussions: https://discu.eu/q/https://unclesp1d3r.github.io/posts/2023/03/go-programming-language-basic-concepts-and-syntax/
today i got a chance to play with #selinux and #golang to hack the planet. yay security #ItsNotThatHard
> var anInt *int
> var anInterface interface{}
> anInterface = anInt
`anInt` is nil
`anInterface` is *not* nil
ಠ_ಠ
gotraceui: the efficient frontend for go execution traces
https://github.com/dominikh/gotraceui
Discussions: https://discu.eu/q/https://github.com/dominikh/gotraceui
#golang セキュリティ・アップデートの予告アナウンス。日本時間では来週水曜日かな
>[security] Go 1.20.3 and Go 1.19.8 pre-announcement https://groups.google.com/g/golang-announce/c/71Wg3N0IZk0
What are people doing for hosting internal/corporate mirrors for Golang?
Unlike other languages there doesn't appear to be an official registry that accounts for 95+% of packages (ala NPM, Pypi, crates.io, etc).
But just discovery via GitHub.
Bonus points for excluding packages with unwanted licenses from the being included in the mirror.
🚨 Today on a very special Go Time LIVE...
Mat Ryer, Natalie Pistunovich & Johnny Boursiquot put on their interviewer hats 🎩 and ask their *best* questions to a potential new #golang developer: GPT-4!!
Join us in ~45 minutes! https://gotime.fm/272/live
@uoxc gocron was the first open-source #golang project I contributed to. Sadly, it was for a feature that was later reverted - panic handling. I find it unacceptable to let a scheduler run without panic handling turned by default - keeping in mind that a single one is guaranteed to crash your entire app.
That and the fact that task functions aren’t required to return errors are two of the things that made me write my own scheduler. It’s about 100 LoC and much simpler but easy to copy around.
🎧 New episode of Go Time 🎧
Mat & Natalie are joined by the creators of Wails and Fyne to dig into writing Go code for different architectures and operating systems 🛠️ #golang
I created an in-memory SQL database called MemSQL as a learning project
https://github.com/hyperioxx/memsql
Discussions: https://discu.eu/q/https://github.com/hyperioxx/memsql
So, learnings, for those that care:
- Scheduling things at times is easy in #golang
- Sometimes "do everything in UTC" is a great aproach to avoid dealing with timezones. Sometimes it's the opposite
- Converting times without days between timezones is a headache
- Yeah I think that's about it for now
\7
So, learnings, for those that care:
- Scheduling things at times is easy in #golang
- Sometimes "do everything in UTC" is a great aproach to avoid dealing with timezones. Sometimes it's the opposite
- Converting times without days between timezones is a headache
- Yeah I think that's about it for now
\7
Let's start with ecosystem: Unlike with data visualization, #golang s ecosystem of "run this code then" seems mature. There's a healthy variety of both cron like schedulers, as well as "run this in x" libraries. We decided to go with https://github.com/go-co-op/gocron , which works great for running regular jobs at regular times. Syntax is intuitive: Pass in a cron-like string and a function, and then call StartAsync(). Alternatively, call functions to schedule stuff more manually. I'm really happy about the ability to schedule things in a certain timezone.
That's "how to schedule" out of the way, next up is "what to schedule". \1

For a #golang project I've recently had to impement jobs that run regularly at different times of day. In short, users indicate at what time they want their corresponding job to run, and that is when the job runs. (low 100s of users, all in one timezone, no strong realtime requirements) Short thread on how we did that, and learnings. 0/8
The worst thing about python is that you can't google anything without finding a bunch of crap about it. Google has the #GPGP
Package for shortest path finding in a set of polygons
https://github.com/fzipp/pathfind
Discussions: https://discu.eu/q/https://github.com/fzipp/pathfind
SwissMap: A smaller, faster Golang Hash Table
https://www.dolthub.com/blog/2023-03-28-swiss-map/
Discussions: https://discu.eu/q/https://www.dolthub.com/blog/2023-03-28-swiss-map/
I just found out Go decided not to have a reliable standard package/module provider but instead it’s normal to just refer to a github repo and a version tag and Go will just… try to pull in that source.
This is pure clown shoes right? 🤡
If your build doesn’t use a reliable proxy and the developer left-pads the repo… then go fuck yourself? How is this serious?
For those of you in the overlap:
Was reviewing a player's #dnd5e character sheet today after a session, and after looking at some #pf2e resources a few weeks ago, I have decided that 5e rules are the #ttrpg equivalent of go library documentation format, which I find somewhat unusable if not hostile to casual use
Your #golang package is *not* well documented if the documentation is only available on some random site you linked to and not in the source code as godoc comments so my editor/IDE can show it to me. /rant
here's a snippet
func F(v string) {
for i := 0; i < len(v); i++ {
b := v[i] // panics here
// ...
}
}
Anybody knows how in the world this can possibly panic? #golang
Integration Tests with Postgres
https://www.storj.io/blog/go-integration-tests-with-postgres
Discussions: https://discu.eu/q/https://www.storj.io/blog/go-integration-tests-with-postgres
Finally finished a first pass of the new version of my Maryland case data scraper (https://github.com/dismantl/CaseHarvester) for @openjusticebaltimore. It's build around a whole new architecture for continually rotating IP addresses of a fleet of scraper VMs, all controlled by an orchestrator written in Go. I love writing in Go and I got some more experience writing and debugging a highly concurrent server application. It's exciting to finally deploy it and watch it scale up!
Show HN: go-nbd – A Pure Go NBD Server and Client
https://github.com/pojntfx/go-nbd
Discussions: https://discu.eu/q/https://github.com/pojntfx/go-nbd
This is the kind of hard-earned, insightful #golang wisdom you can expect from every episode of Go Time 😜
OpenBLAS bindings for Go
https://github.com/blast-go/openblas
Discussions: https://discu.eu/q/https://github.com/blast-go/openblas
🙌 New episode of The Changelog!
After years of working for Google on the Go Team, @filippo quit last year to experiment with more sustainable paths for open source maintainers 🔬
Good news, it worked! 👏
Filippo is now a full-time open source maintainer and he joins @jerod on this episode to tell everyone exactly how he’s making the equivalent to his total compensation package at Google in open source 💰
My library YSMRR has reached 50 starts on #GitHub!
Not everyone’s favourite metric but I’m it means a lot to me that 50 people have taken the time to look and click the button ⭐️ :github:

I hate #golang APIs where every field in a struct is a pointer, no matter what.
Multi million, persistent, synchronous, horizontally scaling WebSockets in Go
https://www.druva.com/blog/websockets--scale-at-fractional-footprint-in-go
Discussions: https://discu.eu/q/https://www.druva.com/blog/websockets--scale-at-fractional-footprint-in-go
Scratched a quick #golang linter rule this morning. I might be onto something, but I don't want to raise everyone's hopes just yet, so stay tuned ;)
If there is a linter that advises on struct val/ptr use already, let me know. I'd be happy to throw this away :)

Oh wow, #ChatGPT is really full of crap.
I asked it about whether it knows an implementation of the leaky bucket algorithm for #golang, and it describes a package and how to use it.
The problem: while the GitHub repository exists, the specific package (.../limiter) does not, and never has, I even checked the git history.
So, ChatGPT will just hallucinate non-existing Go packages and even a plausible API including example usages.

Moving forward, I don't think I will have the capacity of managing both https://goingwithgo.com/ and https://java2go.dev/
It is becoming clear to me that one has to go, allowing me more time to focus on the other (and my family life and day-to-day work, ofc.)
I would really like to choose the one that is going to be more useful for the #golang community in the long term. So, please help me decide. Which one do you find more helpful?
P.S. Boosts are more than welcome!
WebAssembly is for browsers only?
Nope.
Wazero is a WASM runtime for Go. It allows extending your Go app with code written in any language that compiles to a WebAssembly module (WASM).
The makers of Wazero wrote a short overview and introduction, at the end of which you will get lost in the dungeons of Zork.
Also in the latest Applied Go Weekly Newsletter issue:
- Hacking with Go: uses of Go in InfoSec
- Context cancellation: how to properly deal with aborted requests
- Gut for Git: never be scared again to run a Git command in a wrong way
- Go Tip of The Week: a subtle failure mode for pointer receivers
Read it online: https://news.mailings.appliedgo.net/l4z5o1w4h8/
Even better: Get the newsletter every Sunday (that is, two days earlier that I post it here) right into your inbox: https://appliedgo.net/subscribe (and get a handy Go tools cheat sheet)
Coze: A cryptographic JSON messaging specification designed for human readability
https://github.com/Cyphrme/Coze
Discussions: https://discu.eu/q/https://github.com/Cyphrme/Coze
#compsci #cryptography #golang #programming #release #webdev
@changelog wait, I thought this was powered by gophers (#golang). What happened to the cute gophers!? 😱
/cc @\golab_conf @\cool_golang @\GoTimeFM
QT _CONEJO: Are you organizing a #go related conference? Do you want to have the most awesome badges out there than CAN BE PROGRAMMED WITH GO?! Maybe as part of the speaker bag? Use the #gopherBadge !! /cc @\gopherconeu @\GopherCon @\gopherconuk #gopher #golang #rp2040




RT _CONEJO: Are you organizing a #go related conference? Do you want to have the most awesome badges out there than CAN BE PROGRAMMED WITH GO?! Maybe as part of the speaker bag? Use the #gopherBadge !! /cc @\gopherconeu @\GopherCon @\gopherconuk #gopher #golang #rp2040





good grief the maintainers of `golang.org/x/sys/unix` really messed up #golang/#go users. They didn't add git tags until they had broken all users before go1.17.
Trying to build old projects is near maddening with the modules trying to auto update on SemVer.
agggg
#golang tip: When wrapping an error, don't use words like error, failed, cannot, won't, etc. It's redundant and only adds noise to the error message. Imagine the same error being wrapped 10 times, and every wrapped message starts with "Error:".
To provide maximum context, explain what you were trying to do when the error occurred: https://java2go.dev/docs/topics/errors-and-panics/#error-messages
Here are a few such "sub-optimal" examples from well-known Go codebases: https://grep.app/search?q=return.%2Afmt.Errorf%5C%28%22error.%2Aerr%5C%29®exp=true&filter[lang][0]=Go
Concurrency in Go - A deeper look into Go's runtime scheduler
https://meska54.hashnode.dev/concurrency-in-go-a-deeper-look-into-gos-runtime-scheduler
Discussions: https://discu.eu/q/https://meska54.hashnode.dev/concurrency-in-go-a-deeper-look-into-gos-runtime-scheduler
[talk] The carcinization of Go programs
Mat celebrates Johnny's "great link" by breaking out his guitar and singing a “subtle” song called… “Johnny’s Great Link” 🤣 #golang
@aeveltstra #golang also has good tooling built into the standard library for (de)serializing these. I remember having lots of trouble with Java.
I did it! I openly suggested that someone should build the Spring or Quarkus for Go: https://preslav.me/2023/03/23/where-is-the-spring-framework-for-golang/
Am I out of my mind? Probably, but there's some merit to the idea.
Are you organizing a #go related conference? Do you want to have the most awesome badges out there than CAN BE PROGRAMMED WITH GO :tinyGo: ?! Maybe as part of the speaker bag? Use the #gopherBadge !! /cc @TinyGo @Raspberry_Pi #gopher #golang #rp2040 :raspberrypi:





Is there any good, web-only way to make a one click app deploy for a single go binary or a docker file (but not Heroku)? #webdeveleopment #golang #heroku #flyio #docker
#golang learning still going strong, worked through @quii’s “learn go with tests” book - loved the approach.
Just completed the first gophercise (https://gophercises.com/), which I was able to test-drive relatively confidently using those same approaches.
#oss #sqlcmd tool written in #golang - very nice improvement over the old sqlcmd tool!
Hi there, I'm Jonas—a software developer with over 20 years of experience in the industry. #golang #rust #php #typescript #csharp
I'm an avid reader of science fiction and fantasy novels. There's nothing like getting lost in a good book and discovering new worlds and characters.
In my spare time, I enjoy pursuing active or creative hobbies such as hiking, MTB, drawing, painting, and 3D.
I've been a gamer all my life, and it's always been a great way to have fun together.
show reddit: Heresy - Run JavaScript as http.Server middleware
https://github.com/miragespace/heresy
Discussions: https://discu.eu/q/https://github.com/miragespace/heresy
🙌 new episode of Go Time! 🙌
The panel discuss the parts of #golang they never use. Do they avoid them because of pain in the past? Were they overused? Did they always end up getting refactoring out? Is there a preferred alternative?
🎙️ Mat Ryer, Jon Calhoun & @carlmjohnson
Let’s play Unpopular Opinions! 🎸
David Wickes believes the popularity of single-page apps are a conspiracy by large corporations so they can track us 🔥
Hear him out, then vote and reply with your thoughts! #golang
A quick game I made using ebiten
https://ipreferwater-website.vercel.app/blog/bubble-versus
Discussions: https://discu.eu/q/https://ipreferwater-website.vercel.app/blog/bubble-versus
April 2023 issue "The Fediverse" is available now! For fastest service, buy your copy here https://bit.ly/Linux-Newsstand #Linux #Fediverse #Mastodon #diaspora #PeerTube #Pixelfed #OpenSource #SMath #authentication #FOSDEM #kernel #tools #endeavorOS #Golang #Debian #RaspberryPi #privacy
Is there a way to make the #golang compiler warn about unused return values from some interface method?
Specifically I have an interface similar to the builtin append(): MySlice.Append(val) returning a MySlice. If users of MySlice do not use the return value they might have a tricky bug. I know C compilers have provisions for this...
I used to think #Golang lacked generics. But in practice I never really needed them and interfaces did the job. Now that generics are here I'm seeing more and more complexity, courtesy of architecture astronauts. Hopefully Go won't become the Java of Google.
ngrok-go: embed ingress into your Go apps as a net.Listener
https://blog.ngrok.com/posts/ngrok-go
Discussions: https://discu.eu/q/https://blog.ngrok.com/posts/ngrok-go
It's time for Unpopular Opinions! 🤘
Mat Ryer says most people are building software wrong 🔥
https://youtu.be/pAHdGby-J74 👀
After hearing him out, do you agree with this opinion? Vote and reply with why or why not! #golang #opensource #softwaredevelopment
I always feel like I want to claw my eyes out whenever I have to open IntelliJ.
The whole thing is such a bag of fail.
One of many reasons I went down the #Golang, #Rust, #Typescript rabbit-hole was to get away from the #JVM and IntelliJ..
@andrasbacsai #Golang with https://cli.urfave.org/ is my go-to solution for CLI tools. Paired with https://goreleaser.com/ it's really easy to get up to speed and have low friction maintaining it.
Why Turborepo is migrating from Go to Rust
https://vercel.com/blog/turborepo-migration-go-rust
Discussions: https://discu.eu/q/https://vercel.com/blog/turborepo-migration-go-rust
#golang knowers... why does:
```
function_call(int64(9.223372036854776e+18))
```
result in a "cannot convert ... (untyped float constant ...) to type int64" error, but the following works:
```
x := 9.223372036854776e+18
function_call(int64(x))
```
does the variable assignment do some kind of type coercion or something? I'm a little mystified but know very little about how go works here 😅
Why #turborepo is migrating from #golang to #rust.
https://vercel.com/blog/turborepo-migration-go-rust
Any #golang experts here?
I'm trying to compile first devel build of POSH TUI. And mattn/go-sqlite3 dependency requires CGO, which makes cross compilation a pain in the ass.
Which sqlite should I switch to? That doesn't require CGO? @ohmypy maybe you can advise?