Golang
- MVCTipCalc: Simple MVC example fyne project that doubles as a tip calculator.github.com GitHub - ssebs/MVCTipCalc: Simple Model View Controller Fyne project that doubles as a tip calculator.
Simple Model View Controller Fyne project that doubles as a tip calculator. - ssebs/MVCTipCalc
- Comparing memory usage between node.js object and go map[string]interface{}
I'm fairly new to go and I've recently migrated a in-memory cache from node to go for concurrency improvements, but the memory usage difference between the two are huge. I've tried to read up on the map memory model in go but haven't been able to find a reason for the difference. I can't see that I'm doing anything special, so I'm looking for guidance here.
The documents that are stored are around 8 KB in size as a JSON file. In node the memory usage for 50000 documents stored as objects is 1,5 GB, and for go maps it is 10 GB.
To me, this doesn't seem reasonable but I can't find the source of the difference. Could anyone here give their take on this?
- How to build a URL shortener in Go4rkal.com How to build a URL shortener in Go | 4rkal's blog
I will be showing you how to build a url shortener in go.
- Improving Go API request performance4rkal.com Improving Go API request performance | 4rkal's blog
In this post I'll show you how I improved the performance of my go based cryptocurrency exchange aggregator. By making small changes, like using goroutines, switching JSON libraries and reusing HTTP handlers.
- What's in an (Alias) Name?go.dev What's in an (Alias) Name? - The Go Programming Language
A description of generic alias types, a planned feature for Go 1.24
- Go 1.23 iter.Pull powered by coroutinesgithub.com go/src/runtime/coro.go at master · golang/go
The Go programming language. Contribute to golang/go development by creating an account on GitHub.
In the original proof of concept for ranging over functions, iter.Pull was implemented via goroutines and channels, which has a massive overhead.
When I dug in to see what the released code did I was delighted to see that the go devs implemented actual coroutines to power it. Which is one of the only ways to get sensible performance from this.
Will the coro package be exposed as public API in the future? Here's to hoping ♥️
- Go is my hammer, and everything is a nailwww.maragu.dev Go is my hammer, and everything is a nail
Always choose the right tool for the job? Nah. I use Go basically everywhere, which either makes me insightful or stupid. Decide for yourself! :D
> Always choose the right tool for the job? Nah. I use Go basically everywhere, which either makes me insightful or stupid. Decide for yourself! :D
- A set of command line database toolsgithub.com GitHub - yznts/dsh: A set of database tools
A set of database tools. Contribute to yznts/dsh development by creating an account on GitHub.
On my work I'm always switching between databases and kind of tired on UX differences between
psql
,mysql
,sqlite3
. So, I'm making a small set of tools for myself in tries to solve that. It's kinda works for me already and I'd like to share it here :) - VSCode: Debugging Attached Process does not work
I made some Go scripts that require user input
fmt.Scanln(&fileName)
during the execution. When I use the Go debugger built into VSCode which is the launch type, it works but there is no way to enter any prompts when your exeuctable asks for a input. With other programming languages like NodeJS and PHP, there is way to run the scripts in "debugging mode" where it will run the code but before it executes the code, it will wait to attach to a debugger on your system and then execute the code. This has always allowed me to use the terminal for inputs in the executable.For example to do this in NodeJS, you will use
node --inspect-brk=0.0.0.0 main.js
instead ofnode main.js
and then run the debugger in VSCode to attach it to the executing script. Is there a way to do this with Go? Do I need to set something up to achieve this?I am on Linux Mint and cannot find any commands to run
go run .
but to wait for a debugger to attach to the executable before executing. - From @palkan: Learn how to temporarily stream verbose logs from your applications without restarts and even without changing the application-level logging settings.
- oapi-codegen release v2.2.0: Pure-Go 1.22+ server, documentation overhaul. JSON schema and several bug fixesgithub.com Release v2.2.0: Pure-Go 1.22+ server, documentation overhaul. JSON schema and several bug fixes · deepmap/oapi-codegen
Big announcements In case you've missed it, we've got a few big announcements as maintainers of oapi-codegen which we'd recommend you read in more depth. oapi-codegen is moving to its own org Th...
- We're looking for GoLang Contributors
cross-posted from: https://discuss.online/post/8349829
> Hello, > > We're looking for GoLang contributors to help with the federation service. We're happy to have people that contribute code or help with code reviews. > > If you know anyone or if you're interested please reach out! > > Email: hello@sublinks.org > Mastodon: https://utter.online/@sublinks > Online form: https://sublinks.org/join_organization.html > > Thanks, > jgrim
- Social media image generatorgithub.com GitHub - adhd42/oxigen: Social media image generator
Social media image generator. Contribute to adhd42/oxigen development by creating an account on GitHub.
- Beginner resources?lemmy.world Start learning at 50 - Lemmy.World
Start learning at 50 I’ve always wanted to learn programming. I’ve read a blog post saying that at this age it was to late . Then I read a post here in saying the opposite. I’ve found a site that was learn x in y minutes where it has a bunch of languages there. After reading them, the languages that...
After asking for a first programming language here, I've decided learning Go. After some searching I've found that the beginner learning resources are some years old. Can anyone suggest some beginner resources for someone that likes to learn by doing stuff? Thank you.
- Creating a more sustainable model for oapi-codegen in the futurewww.jvt.me Creating a more sustainable model for `oapi-codegen` in the future · Jamie Tanna | Software Engineer
Announcing a request for sponsorship to continue to allow allocating more time to `oapi-codegen` as well as to make more ambitious changes to the project.
- Evolving the Go Standard Library with math/rand/v2go.dev Evolving the Go Standard Library with math/rand/v2 - The Go Programming Language
Go 1.23 adds math/rand/v2 and charts a course for the evolution of the Go standard library.
- Go Developer Survey 2024 H1 Resultsgo.dev Go Developer Survey 2024 H1 Results - The Go Programming Language
What we learned from our 2024 H1 developer survey
- GoLand 2024.1 is out! With a free locally run AI full line completion, performance improvements, and some neat UX improvements. Check it out!blog.jetbrains.com GoLand 2024.1 Is Out! | The GoLand Blog
GoLand 2024.1 is out and comes with exciting new features like full line code completion for Go, a performance boost for indexing and code highlighting, major updates to remote development and dev con
- Go 1.22.2 released
> > > go1.22.2 (released 2024-04-03) includes a security fix to the net/http package, as well as bug fixes to the compiler, the go command, the linker, and the encoding/gob, go/types, net/http, and runtime/trace packages. See the Go 1.22.2 milestone on our issue tracker for details. > >
- Rook, a secret service backed by Keepass 4.x kdbx
cross-posted from: https://midwest.social/post/9890016
> Rook, a secret service backed by Keepass 4.x kdbx > > Howdy Lemmy, > > I'm announcing Rook v0.0.9, software that provides a secret service a-la secret-tool, keyring, or pass/gopass, except backed by a Keepass 4.x kdbx file. > > The problem Rook solves is mainly in script automation, where you have aerc, offlineimap, isync, vdirsyncer, msmtp, restic, or any other cron jobs that need passwords and which are often configured to fetch these passwords from a secret service with a CLI tool. Unlike existing solutions, Rook is headless and does not have a bespoke secrets database, full of passwords that must be manually synchronized with Keepass; instead, it uses a Keepass db directly. > > While the readme goes into more detail, I will say the motivation for Rook evolved from a desire to use a Keepass db in a GUI-less environment and finding no existing solutions. KeepassXC provides a secret service, but is not headless; it also provides a CLI tool, but this requires the db credentials on every call. kpmenu exists, but is designed specifically to require human interaction and is unsuitable for cron environment scripting. Every other solution maintains its own DB back end, incompatible with Keepass. > > Rook also benefits from minimal external dependencies, and at 1kloc is auditable by developers - I believe even by ones who do not know Go (the language of implementation). Being able to verify for yourself that there's no malicious code is a critical trait for a tool with which you're trusting secrets. > > Rook is fit for purpose, and signed binaries are provided as well as build-from-source instructions (for auditors). > > The project contains work in progress: credentials are limited to simple password-locked kdbx, and so doesn't yet support key files. Bash scripts that provide autotyping and attribute/secret selection via rofi, fzf, and xdotool are provided, for GUI environments; these have known bugs. Rook has not been tested on BSD, Darwin, or any other system than Linux, but may well work; the main sticking point is the use of a local file socket for client/server communication, so POSIX systems should be fine, but still, YMMV. > > As a final caveat: up until v0.0.9 I've been compressing with brotli, which is very nice yet somewhat obscure. With the next release, everything will be gzipped. Also included in the next release will be packages for various distributions.
- What even is “Dependency Injection”? (a practical example using Go)medium.com What even is “Dependency Injection”? (using Go)
It’s simpler than it sounds. See what it looks like and understand how simple it can really be.
- The Go 'range over functions' proposal and user-written container types
https://utcc.utoronto.ca/~cks/space/blog/programming/GoRangefuncAndUserContainers
- One Billion Rows Challenge in Golangwww.bytesizego.com One Billion Rows Challenge in Golang
The One Billion Row Challenge (1BRC) is intended to be a fun exploration of how far modern Java can be pushed for aggregating one billion rows from a text file. ..But what happens if you do it in Go?
> Sometime around the middle of January, I stumbled across One Billion Rows Challenge. I had a lot of fun working on this. I started with an execution time of \> 6min and finished at about 14s. Here’s how I went about it.
- How I write HTTP services in Go after 13 yearsgrafana.com How I write HTTP services in Go after 13 years | Grafana Labs
Mat Ryer, principal engineer at Grafana Labs and host of the Go Time podcast, shares what he's learned from more than a dozen years of writing HTTP services in Go.
- Routing Enhancements for Go 1.22go.dev Routing Enhancements for Go 1.22 - The Go Programming Language
Go 1.22's additions to patterns for HTTP routes.
- Questioning Go's range-over-func Proposal
I've seen that a new "range-over-func" experiment is available with Go 1.22. In this article, I took a closer look and evaluated the feature for myself.
- ServerClip - Tool for copying contents of a file over various ssh connections.github.com GitHub - ssebs/ServerClip: Tool for copying contents of a file over various ssh connections. Need to get a log file over to your laptop? This can help.
Tool for copying contents of a file over various ssh connections. Need to get a log file over to your laptop? This can help. - GitHub - ssebs/ServerClip: Tool for copying contents of a file over va...
cross-posted from: https://lemmy.world/post/11504334 >ServerClip is a tool for copying contents of a file over various ssh connections. Need to get a log file over to your laptop? This can help.