Masthash

#golang

Lucas Roesler
14 minutes ago

Probably the first weekend in several months were i finally had some energy to do some extra open source coding. No surprise considering the bug was in a #goLang project.😎

If you need an #OpenAPI codegen for your Go project, check it out

https://github.com/contiamo/openapi-generator-go

Golang Weekly
18 minutes ago

GoLang Goes Retro: Compiler Now Supports Morse Code | TechCrunch

https://tsrn.ch/tAa6Gfj

Discussions: https://discu.eu/q/https://tsrn.ch/tAa6Gfj

#golang #programming

Golang Weekly
4 hours ago
Jonathan Hall
5 hours ago

As software developers, what can we learn from The Sound of Silence?

#golang #go #reaction #music #video #softwaredevelopment #programming

https://youtu.be/YLHaBLPKxu8

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

cvk :verified:
6 hours ago

#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 :-)

Astra Kernel :verified:
6 hours ago

✨ Programming languages used in twitter algorithms (From GitHub)

Where is Go?

#rustlang #python #scala #java #cpp #programming #golang

Programming language in twitter algorithm

Scala 53.8%
 
Java
29.7%
 
Starlark
6.3%
 
Python
4.7%
 
C++
2.4%
 
Rust
1.5%
 
Other
1.6%
Golang Weekly
12 hours ago

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

#golang #programming

Outlander
13 hours ago

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

Outlander
15 hours ago

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

tobychui
18 hours ago

Working on an #opensource #reverseproxy for users with basic to no networking background. Powered by #golang 🙌

KodecoDev
20 hours ago

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

Golang Weekly
20 hours ago

Kubeshark Slack integration: Alert based on Kubernetes network events

https://youtu.be/XtctdMAvhCE

Discussions: https://discu.eu/q/https://youtu.be/XtctdMAvhCE

#devops #golang #kubernetes #programming

Golang Weekly
1 day ago

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

#golang #programming

dkorunic
1 day ago

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.

Golang Weekly
1 day ago

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

#golang #programming

Andrew Block
1 day ago

today i got a chance to play with #selinux and #golang to hack the planet. yay security #ItsNotThatHard

Pete Johns
1 day ago

I expected to like #go (or is it #golang?) a lot more than I did.

Here are some of my slightly ranty thoughts on Go at the end of month 3 of #Exercism's #12in23 challenge.

https://bit.ly/pajGolang

Akido37
1 day ago

> var anInt *int
> var anInterface interface{}
> anInterface = anInt

`anInt` is nil

`anInterface` is *not* nil

ಠ_ಠ

#golang

Golang Weekly
2 days ago

#golang セキュリティ・アップデートの予告アナウンス。日本時間では来週水曜日かな

>[security] Go 1.20.3 and Go 1.19.8 pre-announcement https://groups.google.com/g/golang-announce/c/71Wg3N0IZk0

Dan Sully
2 days ago

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.

#golang

Go Time ⏰
2 days ago

🚨 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

Preslav Rachev
2 days ago

@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.

Go Time ⏰
2 days ago

🎧 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

💚 https://gotime.fm/271

Golang Weekly
2 days ago

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

#golang #programming

Dan
2 days ago

Achievement unlocked: I just solved an actual bug using the go memory benchmarking and pprof.

Then went and ran a `git bisect` too.

Feeling like a proper dev today

#dev #git #golang

Changelog
2 days ago

How does @jerod feel about @gerhard "spoiling" his #elixir code with #golang code?

https://youtube.com/shorts/6C_KrNqzrlU

uoxc
2 days ago

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

uoxc
2 days ago

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

uoxc
2 days ago

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

A screenshot of a piece of code which illustrates the point:

func scheduleAJob() {
    scheduler := goCron.NewScheduler(getLocation())
    // Schedule cron-like
    cronString := "*/1 * * * *"
    scheduler.Cron/cronString)Do(aFunction)
    scheduler.StartAsync()
    // or manually
    timeString := "14:00"
    scheduler.Every(1).Day().At(timesString).LimitRunsTo(1).Do(aFunction)
    schedulerInMensaTimezone.StartAsync()
}

The type timeString vs. timesString is also included in the screenshot. The screenshot looks like vim, but without strong opinions attached.

... does just pasting code in like that even work for screenreaders? Is there a better way? Please tell me if you know, I honestly have no idea.
uoxc
2 days ago

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

#golangDev #programming

@nf3xn
2 days ago

The worst thing about python is that you can't google anything without finding a bunch of crap about it. Google has the #GPGP

#rust #golang #deprecatepython

Golang Weekly
2 days ago
Daniel
2 days ago

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?

#GoLang

Antony "no h" Saba
2 days ago

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

#golang #go

freeformz
2 days ago

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

3 days ago

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

Dan Staples
3 days ago

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!

#legaltech #golang #scraping

Golang Weekly
3 days ago
Go Time ⏰
3 days ago

This is the kind of hard-earned, insightful #golang wisdom you can expect from every episode of Go Time 😜

https://youtube.com/shorts/v9xstSn5uh8

Changelog
3 days ago

🙌 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 💰

#opensource #golang #maintainer

🎧 https://changelog.fm/533

Craig Gumbley
3 days ago

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:

#golang #softwaredevelopment #opensource

The ysmrr repo showing 59 stars ⭐️

I hate #golang APIs where every field in a struct is a pointer, no matter what.

Preslav Rachev
3 days ago

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 :)

Xe :verified:
4 days ago

How to use a fork of the Go compiler with Nix

https://xeiaso.net/blog/go-fork-nix

#golang #nix

Andreas Krennmair
4 days ago

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.

A screenshot of parts of a conversation with ChatGPT.

Me: can you recommend a Go implementation of leaky bucket to me? 

ChatGPT: Yes, I can recommend a Go implementation of the leaky bucket algorithm. One popular library that provides an implementation of the leaky bucket algorithm is "go-resiliency”, which is a collection of resiliency patterns for Go applications.

To use the leaky bucket algorithm from go-resiliency, you can follow these steps:

1. Install the go-resiliency package by running the following command:

go get github.com/eapache/go-resiliency

2. Import the leakybucket package from go-resiliency in your Go code:

import "github.com/eapache/go-resiliency/limiter"
Preslav Rachev
4 days ago

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!

#programming

Applied Go
4 days ago

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)

#golang #wasm #git

Golang Weekly
5 days ago

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

Brandon Mitchell
5 days ago

@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

One of the gopher badges has already met his new friend 😬🧑‍🔧🤖 #golang #tinygo #gophers

- Prototypes have been sent 📦 to beta-testers 👩‍🔧
- Hopefully website with more info this week, so I could start bullying conference organizers to buy some for their speakers (or attendees) and fund further development
- Playground for mid-April
#golang #tinygo #gophers

Vincent Batts
6 days ago

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

Preslav Rachev
1 week ago

#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&regexp=true&filter[lang][0]=Go

Go Time ⏰
1 week ago

Mat celebrates Johnny's "great link" by breaking out his guitar and singing a “subtle” song called… “Johnny’s Great Link” 🤣 #golang

https://youtube.com/shorts/JQ1jEkBYEOU

Gabriel :python: :django:
1 week ago

@aeveltstra #golang also has good tooling built into the standard library for (de)serializing these. I remember having lots of trouble with Java.

Preslav Rachev
1 week ago

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.

#springboot #quarkus #java #golang

Go Time ⏰
1 week ago

🌟 New episode of Go Time! 🌟

Our “Hacking with Go” series continues! This time Natalie & Johnny are joined by Ivan Kwiatkowski & Juan Andrés Guerrero-Saade and the conversation is we’re focused around generics and AI 🦿

#golang #infosec #llm #copilot #chatgpt

🎧 https://gotime.fm/270

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:

Astra Kernel :verified:
1 week ago

I don't use i++ (*unary increment operators) even if the language supports it.
What about you?

#rustlang #golang #programming #php #python #ruby #swift

Reaction of people after finding Rust does not have increment operator.

Then reaction of people after i tell them ruby, python, Swift also does not have 
Reaction of people:After i tell them, python, ruby, swift and others also don't have
Ben Lee-Cohen
1 week ago

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

Simon Scarfe
1 week ago

#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.

Rocky Lhotka 🌴 🤘🖖
1 week ago

#oss #sqlcmd tool written in #golang - very nice improvement over the old sqlcmd tool!

https://github.com/microsoft/go-sqlcmd

#sqlserver

Preslav Rachev
1 week ago

Apologies, that's a leftover from my #golang days 🙈😅

#programming #java

Jonas Wouters
2 weeks ago

#introduction

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.

increasingly keen on writing small go programs instead of bash scripts - at least for anything above 10 lines

still easy to deploy anywhere since you get a static binary, you get type checking thrown in, and you don't have to deal with bash's bullshit

#go #golang #bash #devops #sre

Golang Weekly
2 weeks ago
Go Time ⏰
2 weeks ago

🙌 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

🎧 https://gotime.fm/269

Winni Neessen
2 weeks ago

slog proposal was accepted for Go 1.21. That's great news indeed! #go #golang

Go Time ⏰
3 weeks ago

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 🔥

https://youtu.be/ZHgCWOiCFaw

Hear him out, then vote and reply with your thoughts! #golang

Scott Williams 🐧
3 weeks ago

Absolute legends! #unix #golang #scale20x

Me with Ken Thompson
Me with Jon Maddog Hall
Ken Thompson and Jon Maddog Hall
Linux Magazine
3 weeks ago
Linux Magazine #269 - April 2023 | The Fediverse: Social media the FOSS way
kamstrup
3 weeks ago

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.

Golang Weekly
3 weeks ago
Changelog
3 weeks ago

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

Wille
3 weeks ago

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..

Christopher Hlubek
3 weeks ago

@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.

Sasha
3 weeks ago

Interesting insights from StackOverflow about #rustlang vs #golang questions popularity.

https://insights.stackoverflow.com/trends/?tags=rust%2Cgo

graph showing rust getting ahead of go in 2023
Mika
4 weeks ago

#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 😅

skat
4 weeks ago

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?

Robert Sigler
1 month ago

Today's #atl rain reminded me I made a thing. So I updated the thing. It's some code I wrote when I was learning #golang.

It probably has some areas requiring polish, but at least it works! (I know... it lacks tests.) #rtfm #ymmv

https://github.com/rmrfslashbin/openweather

carlos becker
1 month ago

This is your gently reminder that, in YAML, 1.20 == 1.2, so if you want to use go 1.20, you'll need to put it between quotes.

#golang #github #yam