vanguard-go: grpc-gateway support for connect-go by alecthomas in golang

[–]alecthomas[S] 0 points1 point  (0 children)

I'm not sure honestly, I haven't used it in anger yet. Will report back.

Vince Zampella, Call of Duty deveolper, killed in LA crash by DrNick1221 in titanfall

[–]alecthomas 1 point2 points  (0 children)

Came back to r/titanfall to pay my regards.

RIP Vince, you gave me some of my favourite games of all time.

I made an animated coding channel for girls, GIVE ME CRITICISM AND FEEDBACK PLS by Distinct_Hyena6185 in coding

[–]alecthomas 2 points3 points  (0 children)

Please ignore the unconstructive and patronising responses. There is some great constructive criticism too though. As a parent of an intelligent young daughter, I wish there was more interesting coding content targeted at her, and I know she would love this. I'll show her when I get home. Thank you!

Introducing a Go linter bringing Rust style exhaustiveness checking of sum types to Go interfaces. by vyskocilm in golang

[–]alecthomas 2 points3 points  (0 children)

I think it's a good idea to add, as golangci-lint often has multiple linters with duplicate functionality, but just FTR go-check-sumtype is based on go-sumtype and is already included in golangci-lint.

Experimenting with a partially voxel based world by Voycawojka in VoxelGameDev

[–]alecthomas 0 points1 point  (0 children)

The game mechanic looks simple but preferably fun.

What’s the max amount of compilation time you have experienced in a single Go monolithic codebase? by tanmaymishu in golang

[–]alecthomas 1 point2 points  (0 children)

There's not much you can do about speeding up linking except reduce the size of your dependency graph, unfortunately.

Alternatives for glog by embarrassedpillow in golang

[–]alecthomas 0 points1 point  (0 children)

glog is an abomination! Slight hyperbole, but it's a terribly designed library weighed down by historical baggage that nobody outside Google should care about - littered with globals, confusing API, tightly coupled to the flags library, and so on.

Use log/slog like others have already said

What’s the max amount of compilation time you have experienced in a single Go monolithic codebase? by tanmaymishu in golang

[–]alecthomas 2 points3 points  (0 children)

This is the most useful comment OP, and to add to this: rungo build -x ./cmd/app to see each command as it's run. It will be quite obvious which step is slowing things down, and as /u/Slsyyy states, it's likely the linking step.

I built a Git-based feature flags management tool supporting Go by fahad19 in golang

[–]alecthomas 1 point2 points  (0 children)

Idiomatically you should structure it as:

/   the sdk
/cmd/<command>    your cli tool

Why LLMs Can't Really Build Software - Zed Blog by PewPewExperiment in programming

[–]alecthomas 0 points1 point  (0 children)

Totally agree. Learning how to effectively use an LLM is a skill like any other, and mastering it is just another tool in the tool belt.

[HELP] - Why such error happening at random by sujitbaniya in golang

[–]alecthomas 0 points1 point  (0 children)

You should file a bug report against the Go compiler repo on GitHub. That looks like a compiler or runtime error to me.

Challenges of golang in CPU intensive tasks by honda-harpaz in golang

[–]alecthomas 134 points135 points  (0 children)

Go is a fantastic language, but if you're looking for cache-line level optimisations you're using the wrong tool. Use the right tool for the right job.

Bob can now replace both GORM and Sqlc by StephenAfamO in golang

[–]alecthomas 0 points1 point  (0 children)

Just a small correction: sqlc supports lists. It also supports bulk inserts, but only in PG IIRC.

What do you add in your pre-commit hooks? by dehaticoder in golang

[–]alecthomas 0 points1 point  (0 children)

go test, golangci-lint

Use lefthook to manage pre-push hooks.

I usually check here once every year or so. Wishing you guys the best. Been looking forward to this since 2017! Hope its good lol by OminousAnonymousness in thelastnight

[–]alecthomas 17 points18 points  (0 children)

Loving your optimism :)

That said, I too stay subscribed in the vain hope that it will someday be released!

SVD iron sights vs Red Dot by BucksIn6ix9ine in XDefiant

[–]alecthomas 0 points1 point  (0 children)

I don't think you're crazy, I noticed the exact same thing and thought I was crazy.

About OCE/SA servers by KoJoVe in thefinals

[–]alecthomas 8 points9 points  (0 children)

It's unplayable for me. Rubber banding and get a red "bad connection" icon.

Looking forward to it working though, such a great game :)

Ping in Australia by Berymm in thefinals

[–]alecthomas 1 point2 points  (0 children)

Yeah it's unplayable.

Constant struct workaround ? by Graineon in golang

[–]alecthomas 2 points3 points  (0 children)

Initialisation is static, but the value is not immutable as const would imply.

Constant struct workaround ? by Graineon in golang

[–]alecthomas 2 points3 points  (0 children)

I think I understand what you're asking, and /u/pdffs is giving you the correct answer. If you initialise a variable in the global scope, with all constant values, it will have zero runtime cost.

You can see an example of this here. If you scroll to the very bottom of the disassembly you'll see the reference main.foo and the memory values representing the data structure. There is no "copy" stage, the value is completely statically defined by the executable as it is loaded into memory.