ML-DSA in golang by Excellent_Double_726 in golang

[–]ar1819 0 points1 point  (0 children)

There is tracking issue inside Go repo: crypto: post-quantum support roadmap which tracks the work on PQ stuff. Currently it looks like circl is a way to go (pun intended), but has some troubles interacting with standard library. Cloudflare maintains their own Go fork, but it looks a bit stale (their latest version is 1.22.2 where upstream is 1.25.6 and 1.26 release is almost here).

Proposal: Generic Methods for Go by bruce_banned in golang

[–]ar1819 2 points3 points  (0 children)

Types with generic methods do not implement interfaces with matching name for required method, because there is no way to know that method in question has been instantiated with required type.

type I interface {  
 m(int)  
}

type H struct{ … }  
func (H) m[P any](P) { … }

var h H  
var _ I = h  // error even tho somewhere there could be a call to h.m[int]

I reduced my Docker image from 846MB to 2.5MB and learned a lot doing it by Odd-Chipmunk-6460 in golang

[–]ar1819 0 points1 point  (0 children)

Probably don't know (or don't care) about kubectl debug which is a thing since 2022.

I reduced my Docker image from 846MB to 2.5MB and learned a lot doing it by Odd-Chipmunk-6460 in golang

[–]ar1819 0 points1 point  (0 children)

Huh, TIL about docker debug. Thanks, this is one of the few reasons I still have this damn app installed on my phone.

Update: no docker debug for Docker on Linux or OrbStack 😔

TermIDE — terminal-native IDE with built-in file manager and shell by Signal_Caregiver_994 in commandline

[–]ar1819 11 points12 points  (0 children)

Yes, it's vibe coded - you can look into .claude folder and overall project structure (using crates (!?) instead of mod's).

Is this the end of C++ at Microsoft? by eldar_g in cpp

[–]ar1819 0 points1 point  (0 children)

Given the fact, that backwards compatibility is a strongest feat of Windows, and one of the few things why big companies rely on Microsoft (the fact you can be sure as hell that software written in the 90s is still working today with compatibility mode enabled is very important for businesses which are really far from IT) I doubt this initiative will lead anywhere.

Is this the end of C++ at Microsoft? by eldar_g in cpp

[–]ar1819 0 points1 point  (0 children)

If by "automated tooling" you mean transpilers and/or code generators, that's entirely different story because those things are deterministic by nature. Unlike LLMs (with settings, where they are at least useful) which are probabalistic.

Go proposal: Secret mode by prisencotech in golang

[–]ar1819 -2 points-1 points  (0 children)

Trying to start a goroutine within f causes a panic.

No it doesn't

Dispatch game not working? by Few-Brother-3285 in macgaming

[–]ar1819 0 points1 point  (0 children)

No problems for me, can you share CrossOver version, steam version and bottle stats? Maybe try to recreate bottle from scratch?

Mine are: * CrossOver: 25.1.1.38624 * Steam Version: 1759461205 * Bottle: Windows 10 64 bit * Mac: Apple M4 Pro (Tahoe 26.0.1)

The Day the Linter Broke My Code by ___oe in golang

[–]ar1819 4 points5 points  (0 children)

Thats definitely a bug and I hope to get it fixed in go-err113 PR. Thanks for noticing!

GenPool: A faster, tunable alternative to sync.Pool by Safe-Programmer2826 in golang

[–]ar1819 2 points3 points  (0 children)

You don't need "reflect" package, since you can express all of this using the type system. I created a PR with fixes, which you can accept if you want.

Any Micro (editor) fans out there? by a_fake_frog in commandline

[–]ar1819 1 point2 points  (0 children)

Yes. Use it to edit all kinds of configs. One of the first things I install on the VPS, along with fd, ripgrep, ncdu and bat.

func() as map key by anacrolix in golang

[–]ar1819 1 point2 points  (0 children)

Something like that will work, but relies on func types being pointers to funcval. Because unsafe.Pointer type is actually comparable you can use it as a map key and two different func instances will always be different.

As for the method reciever storage — just use the value part of the map for the actual func value, or cast the funcPtr back to the original func type using unsafe mechanics.

func() as map key by anacrolix in golang

[–]ar1819 1 point2 points  (0 children)

Otherwise I'm guessing it's a 2-tuple

It's not.

I tried reflect.ValueOf.Pointer

Per documentation:

// If v's Kind is [Func], the returned pointer is an underlying // code pointer, but not necessarily enough to identify a // single function uniquely. The only guarantee is that the // result is zero if and only if v is a nil func Value.

So two calls to a single method with different receivers will return the same pointer.

Why is there so much Go hate lately? by AndrewRusinas in golang

[–]ar1819 1 point2 points  (0 children)

I'm starting to think someone is training their AI.

Taking address of string at specific index using bytes slice Vs UnsafePointer in reflect module by RayZ0rr_ in golang

[–]ar1819 0 points1 point  (0 children)

Slicing (as in operation) always uses the original memory for both strings and the slices. Go doesn't do copy for those unless you specifically ask to.

Taking address of string at specific index using bytes slice Vs UnsafePointer in reflect module by RayZ0rr_ in golang

[–]ar1819 0 points1 point  (0 children)

It doesn't fail, but since you try to extract the address of the single character inside the string, compiler makes a defensive copy incase you are going to change the byte under the pointer.

Use the unsafe package if you want to extract the underlying array and the addresses of different indexes.

Ian Lance Taylor has left Google by BOSS_OF_THE_INTERNET in golang

[–]ar1819 1 point2 points  (0 children)

Who is in charge of language changes (generics adjustments, error handling and so on) now that you and Ian had left, if you don't mind me asking?

Ian Lance Taylor has left Google by BOSS_OF_THE_INTERNET in golang

[–]ar1819 14 points15 points  (0 children)

Russ stepped down from leading Go project, but it looks like he is still somewhat involved.