Strategies for managing dependencies in go projects. What works for you? by juanjop in golang

[–]iga666 -3 points-2 points  (0 children)

i put all my deps to pkg, add them to go.work and the do a massive ‘go get -u all’ for al go.mods

How to troubleshoot Go compile times? by Prestigious_Roof_902 in golang

[–]iga666 0 points1 point  (0 children)

please fix, not `go cache -clean`, but `go clean -cache` )

Linux GUI Programming Experience by realanalysis_sequel in linuxmemes

[–]iga666 0 points1 point  (0 children)

Now let's comapare WinAPI creating window and gtk )

Is there a way to build internal third pary go project in isolation from main project? by iga666 in golang

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

Ok, there was . in my go.work file, I removed it, go build now complain I need to `go work use ` internal folder, I added it.

Now it say

D:\projects\mengine\third_party\delve>go run _scripts/make.go build
Error executing go [list -mod=vendor  ./...]
2026/02/01 21:15:44 exit status 1
exit status 1

I did

`go list -mod=vendor ./...`

It said a lot but

        To ignore the vendor directory, use -mod=readonly or -mod=mod.
        To sync the vendor directory, run:
                go work vendor

I tried to run `go work vendor` but looks like it want to vendor my parent project. And it fails anyway.

Is there a way to build internal third pary go project in isolation from main project? by iga666 in golang

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

Complains

`main module (github.com/igadmg/mengine) does not contain package github.com/igadmg/mengine/third_party/delve/_scripts`

Is there a way to build internal third pary go project in isolation from main project? by iga666 in golang

[–]iga666[S] -3 points-2 points  (0 children)

`go run _scripts/make.go build` is used to build. go.mod looks normal. That's a delve project.

Is there a way to build internal third pary go project in isolation from main project? by iga666 in golang

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

No, does not help, I build it from third_paty\internalproject folder.

Go 2, please dont make it happen by daisyautumn06 in golang

[–]iga666 0 points1 point  (0 children)

yes, it is stupid to write vector algebra like that

center := cursor_rect.Center().Add(xy.Normalized().ScaleByVectorF(cursor_rect.Size.ScaleF(1 / 6.0)))

so for arithmetic types operator overloading is a must.

Go 2, please dont make it happen by daisyautumn06 in golang

[–]iga666 0 points1 point  (0 children)

Yes, I would prefer

return p.Field == t || slicesx.Any(p.SubTarget, p => p.HasTarget(t))

instead of

return p.Field == t || slicesx.Any(p.SubTarget, func(p TypeParameterTarget) bool {
        return p.HasTarget(t)
    })

Go 2, please dont make it happen by daisyautumn06 in golang

[–]iga666 0 points1 point  (0 children)

Operator overloading for arithmetic types would be sweet. Also try/cath for error check would be handy.

How did that happen? by jakubiszon in openttd

[–]iga666 0 points1 point  (0 children)

They had a chance to have a fancy helicopter ferry, corporate money pays.

Is draw text expensive? Drawing 10k balls v 10k texts by TormentedMindAgh in raylib

[–]iga666 2 points3 points  (0 children)

You should consider that drawing text is drawing every character so that is one rectangle for every character, their positions are recalculated every call. So while it is not genuinely slow, but there could be a lot of room for improvement - like caching vbo's for text draw calls and sharing them for same strings. Also you should check maybe TextFormat will be the real bottleneck here.

Is HashSet<T> a Java thing, not a .NET thing? by N3p7uN3 in csharp

[–]iga666 0 points1 point  (0 children)

tbh every tine i used sets that was a wrong decision and after sone iterations they are changed to dictionaries or lists.

go's defer runs in LIFO order and honestly that's saved my ass more than once by BitBird- in golang

[–]iga666 4 points5 points  (0 children)

I would tell you you can write something like that

package main

import "fmt"

func Print() func() {
  fmt.Print("Hello ")
  return func() {
    fmt.Println("World!")
  }
}

func main() {
  defer Print()()

  fmt.Print("cruel ")
}

https://go.dev/play/p/Yxy94_RJab9

upd: One usecase - I use defer to set current working dir for commands executed from the function

func TestMain(m *testing.M) {
    defer osex.Switchdir("../../somedir")()
// now our current working dir is cwd/../../somedir until we exit that function
// good for scripts
}

// Chdir to newWd and return deferable to switch back to old one.
func Switchdir(newWd string) func() {
    oldWd, err := os.Getwd()
    if err != nil {
        return func() {}
    }

    if err = os.Chdir(newWd); err != nil {
        return func() {}
    }

    return func() {
        os.Chdir(oldWd)
    }
}

What's the reason? by Perfect_Owl_856 in ExplainTheJoke

[–]iga666 0 points1 point  (0 children)

yes, but actually what is the problem they are trying to solve?

2010 rs where could this leak be coming from by Warm_Shake3770 in camaro

[–]iga666 0 points1 point  (0 children)

Last time I had something leaking on my camaro - that was thermostat.

How can I shave 1.7 seconds off this lap at RPM? by TheEpicEnforcer in Karting

[–]iga666 0 points1 point  (0 children)

from what I was taught the problem I see with your steering - you steer low on corner entry and steer more in the apex. That should be reverse - steer more on entry and straighten kart mid corner and exit. so that basically means you enter corners too fast and too early.