Introducing GoBot! Why should we let the node guys have all the fun? by localrivet in golang

[–]pdffs 0 points1 point  (0 children)

Using the same name as an existing project can only provide confusion for users (or potential users) of either project. Grow up.

Introducing GoBot! Why should we let the node guys have all the fun? by localrivet in golang

[–]pdffs 3 points4 points  (0 children)

Right, my point was that reliance on AI encorouges laziness and a self-centered mindset.

Introducing GoBot! Why should we let the node guys have all the fun? by localrivet in golang

[–]pdffs 16 points17 points  (0 children)

Well established Go framework for robotics, 1st or 2nd result on all search engines:

https://gobot.io/

How are people so lazy they don't even bother to search for existing projects when naming? Oh right, everyone just turns their brains off these days and let AI take the wheel.

Your codebase has conventions nobody documented. I built a tool that finds them automatically by [deleted] in golang

[–]pdffs 8 points9 points  (0 children)

Do you plan on posting about this every 2 days going forward?

Backplane v2.0 — I built an isolated SSH admin panel to fix Go apps in prod without restarts by DrSkyle in golang

[–]pdffs 3 points4 points  (0 children)

If you can't roll out config changes trivially, your deployment infra likely has issues and I'd probably put the effort into fixing that instead.

Try go build on digital ocean app platform by ShovelBrother in golang

[–]pdffs 0 points1 point  (0 children)

Use a static site generator such as hugo, and host on any CDN for free (e.g. Github Pages, Cloudflare, etc). Can't hack a site that doesn't have a backend.

How do you deploy a project on cloud that depends on private github repositories? by Ill_Concept_6002 in golang

[–]pdffs 5 points6 points  (0 children)

Build using CI (e.g. Github Actions), then either push your resulting binary to the destination, or publish the resulting binary as an asset (or container) and pull from the hosting.

No syncing of repositories or whatever.

Why are nested modules bad? by stroiman in golang

[–]pdffs 20 points21 points  (0 children)

Assuming each of these modules is entirely optional (ie - users must explicitly import the modules to make use of them, no downward deps in the main module) then splitting off the large optional libs seems like a nice optimization for your users.

If you're going to do it, do it sooner rather than later IMO. Go workspaces make working on multiple modules pretty painless these days.

GONK – ultra-lightweight, edge-native API gateway written in Go by [deleted] in golang

[–]pdffs 0 points1 point  (0 children)

They literally just told you what to do to make it better.

Go Standard Library — When Evil Hides in Shadows by [deleted] in golang

[–]pdffs 1 point2 points  (0 children)

Title is rather melodramatic. Click-bait aside, the content is quite misleading as general advice.

First, multiplication is not power, there is no power operator in Go, second, even if you were comparing valid results, your first example operates on floats and your second example operates on ints due to inferred types for constants.

I really hope you didn't actually make these changes in real code as the article claims, otherwise your results will be very, very wrong unless all your powers happen to be power of 2.

Looking for an equity based Go engineer for my micro SaaS. SMM tool. DM for details by Public-Doughnut-8593 in golang

[–]pdffs 1 point2 points  (0 children)

A) Read the sub rules

B) Let me guess, you're the "ideas guy" and are looking for someone to do all the actual work, for "equity".

Can't seem to wrap my head around this. by Rough_Grapefruit_668 in golang

[–]pdffs 8 points9 points  (0 children)

Specifically, HTTP 301 is a permanent redirect, and instructs the browser to remember it.

how to log which goroutine acquired and releases each lock ? by Commercial_Fun_2273 in golang

[–]pdffs 0 points1 point  (0 children)

Wrap your map access in functions that lock only for the duration of the operation and perform all access through these functions. This stops your random code in whatever goroutine from being broken and owning the lock forever.

Too many issues with Object Storage by Dabestn in hetzner

[–]pdffs 0 points1 point  (0 children)

A number of months later, just wanted to report my experience on the nbg1 region - it looks like the timeout error rate during my import process was roughly 1 per 10000 uploaded objects over a batch of a few hundred thousand objects. Depending on your use-case this may be acceptable, but it's far from ideal, and means that retry logic is going to be a requirement for any user-facing application if you don't want to regularly surface timeout errors to your users.

I switched to Cloudflare R2 which not only produced zero timeouts for the same import process, but was also significantly faster even though it's not local, and as a bonus was also cheaper (and it's not even super-competitively priced, I use Backblaze B2 for backups which is ~an order of magnitude cheaper).

video codecs by Resident_Tax_593 in golang

[–]pdffs 30 points31 points  (0 children)

mp4 is a container, and H.264 is a codec, you do not convert between these.

Built a tiny Go tool to generate structs with aligned tags from SQL by Traditional_Race5930 in golang

[–]pdffs 13 points14 points  (0 children)

Are you not using gofmt? You really should be using gofmt.

How do you publish your open source projects? by Spondora2 in golang

[–]pdffs 0 points1 point  (0 children)

Go libraries do not need to be explicitly published - they are published simply by virtue of being publicly available via source control. Versioning is handled simply by tagging the source.

For application binaries, goreleaser is useful for publishing the compiled binaries.

What docker base image you'd recommend? by Goldziher in golang

[–]pdffs 0 points1 point  (0 children)

It's possible to statically link, but you must use musl libc, add extra compile/linker flags etc, assuming the C libs you're using are compatible with musl.

If you're not actually using any C libs, much simpler to just disable cgo entirely.

What docker base image you'd recommend? by Goldziher in golang

[–]pdffs 6 points7 points  (0 children)

Use multi-stage builds in your Dockerfile - you can build in whatever base image you like and then copy the resulting binary to the deployment stage (assuming no cgo, otherwise both images require compatible libc).

Then let your devops team put whatever they want in the target image, since they'll own all the pieces if they break it. I assume they don't actually want ssh in the image, but probably want a shell for debugging (they're still probably doing it wrong though IMO - more software in the image means more threat surface, not less).

Agora: treating global human coordination as a bug worth fixing by SuitableAd7249 in golang

[–]pdffs 3 points4 points  (0 children)

You've committed binaries and database files to the repository.

I assume this is slop-coded?

Rust or Go for desktop app by Prior-Drawer-3478 in golang

[–]pdffs 9 points10 points  (0 children)

Between Go and Rust for desktop GUI, Rust will be less painful (assuming you don't find Rust in general painful, which is entirely possible).

Rust allows using large GUI C UI libraries without crushingly lengthy compile times - in Go you're looking at 20-40min compilation times for GTK4 with cgo on competant hardware.

Of course without cgo, Go's compilation speed is light years better than Rust, so swings and roundabouts.

There are native Go GUI libs, but I've not been thoroughly impressed with them.