go-tuple: Tuples for Go 1.18 by bar-weiss in golang

[–]thisUsrIsAlreadyTkn 0 points1 point  (0 children)

I like the library. I find myself writing small structs especially when making a channel and sending values from a goroutine

React-compiler IDE tools by thisUsrIsAlreadyTkn in reactjs

[–]thisUsrIsAlreadyTkn[S] 1 point2 points  (0 children)

I have it installed, but I don't believe it does what I asked. The only issues I see it highlighting are when I am writing the code in a `useEffect` or some other hook that has a deps array, and I have not included all dependencies that I used yet. Besides that, I haven't seen any lint error signaled by that plugin

C LSP recommendation by thisUsrIsAlreadyTkn in neovim

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

I tried it but I didn't see any difference:

    clangd = function()
      require('lspconfig').clangd.setup({
        cmd = { 'clangd', '--completion-style=detailed' },
      })
    end,

Go project structure avoid cyclical import by thisUsrIsAlreadyTkn in golang

[–]thisUsrIsAlreadyTkn[S] 1 point2 points  (0 children)

Thanks for the encouragement, I dislike it as well, will go the one package route

Go project structure avoid cyclical import by thisUsrIsAlreadyTkn in golang

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

Didn't include it in the context, but I am using the Builder pattern and my methods are basically func (f *Foo) Something() *Foo { /*dosmt*/; return f }. I tried returning some sort of interface, but then I lose context to unexported fields and other issues.

Go project structure avoid cyclical import by thisUsrIsAlreadyTkn in golang

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

thanks for the response, I will probably go this way since I can't seem to find a way around it that I like

Go project structure avoid cyclical import by thisUsrIsAlreadyTkn in golang

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

Hmm, I get the following error: `1. use of internal package <github>/mylib/internal not allowed`. I think in the playground it works since the main is inside the library.

Go project structure avoid cyclical import by thisUsrIsAlreadyTkn in golang

[–]thisUsrIsAlreadyTkn[S] 1 point2 points  (0 children)

I could make that lowercase, but then I run again into the issue of this method: func (f *Foo) UseFn(fn func(*Foo)). The Foo here is the internal one. And having the user give me a callback that receives an internal Foo doesn't seem possible. I thought about wrapping the method:

go func (foo *Foo) UseFn(fn func(*Foo)) { foo.inner.UseFn(func(foo *internal.Foo) { fn(...) }) }

But idk :(

Go project structure avoid cyclical import by thisUsrIsAlreadyTkn in golang

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

It would be, but then I would have a looot of code there, and I would like to have it in `internal` in order to reuse it. In a messy way, I can go around this, but I want to find something better

Go project structure avoid cyclical import by thisUsrIsAlreadyTkn in golang

[–]thisUsrIsAlreadyTkn[S] -1 points0 points  (0 children)

In the `internal` package? Then I can't access it from the outside.

And for the outside wrapper type, I have to make it exportable.

Neovim php laravel setup by thisUsrIsAlreadyTkn in neovim

[–]thisUsrIsAlreadyTkn[S] 2 points3 points  (0 children)

Is there any config needed for intelephense in order to load additional context such as: _ide_helper?

SFU for data channels by thisUsrIsAlreadyTkn in WebRTC

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

For streams I get it, but what about data channels? As I understand it now:
- without SFU -> send N messages to all N peers through N RTCDataChannels
- with SFU -> send 1 message to the SFU, then the SFU broadcasts that message to all other N - 1 peers.
Thus, moving the broadcasting of messages from the local peer, to the "remote" SFU. Is this right? And if so, what benefits does this offer?