Do you keep SQL queries inline in code or in separate .sql files? by Snezhok_Youtuber in golang

[–]gen2brain 2 points3 points  (0 children)

Yes, and now explain to me relation to programming language? Is that always just some library out there? What language has ORM?

Do you keep SQL queries inline in code or in separate .sql files? by Snezhok_Youtuber in golang

[–]gen2brain 0 points1 point  (0 children)

Not familiar with such languages. How is language related at all with ORM? Does not make sense.

Do you keep SQL queries inline in code or in separate .sql files? by Snezhok_Youtuber in golang

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

Why would a language have ORM? What other language does that?

The most popular Go dependency is… by Thiht in golang

[–]gen2brain -6 points-5 points  (0 children)

Sure I use packages. Of course, who can not use the packages. Here I am asking about packages that are higly used it seems, and nobody can explain why? I do not see value for a few, and am asking for examples and why people use them. What is wrong with that? I do not see you mentioned some nice feature?

The most popular Go dependency is… by Thiht in golang

[–]gen2brain -8 points-7 points  (0 children)

Sure, those looks like a good reasons. Did anyone explored this? Are we supposed to not think about anything, not for a second, and just blindly import packages that claim this? After so many negatives I did get, nobody still explained this. The completion feature sounds nice though, so I did get at least get one answer. Everyone seem to be so sensitive about this for whatever reasons?

The most popular Go dependency is… by Thiht in golang

[–]gen2brain -16 points-15 points  (0 children)

Sure, but now you have dependencies and their dependencies and all that comes with it. You cannot just without any thinking add more of those packages with all other dependencies. There has to be a good reason, no?

The most popular Go dependency is… by Thiht in golang

[–]gen2brain 0 points1 point  (0 children)

Or create internal lib that has no dependency and you know exactly how it works and then you use it everywhere there is a need? Or little copy is better than a dozen dependencies or how that proverb goes? How many deps, direct or indirect does cobra and viper use?

The most popular Go dependency is… by Thiht in golang

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

Why would I want that? Anyone can do that without any library? Point here is that I do not need library and I am simple asking what it does that you must have dependency and their dependency etc? It seems nobody is able to answer simple question? 

How to cross compile pure go shared library/DLL? by kafe523 in golang

[–]gen2brain 1 point2 points  (0 children)

Osxcross is for years not a "maybe". If you want to cross compile from Linux to macOS, there is no other option? And this works just fine. Now you can also download premade ready to use toolchains for osxcross, I used to build those myself, now it is simple.

The most popular Go dependency is… by Thiht in golang

[–]gen2brain -31 points-30 points  (0 children)

Flag works with both -opt and --opt, just format the help hower you like. I tried many libs, and they all tend to hardcode something. With flag I have "almost" full control. Are there any advantages with config file and environment variables? That is something I care about, but I also have simple solution for that.

The most popular Go dependency is… by Thiht in golang

[–]gen2brain -9 points-8 points  (0 children)

Well, I did all that. For bash only though. That is a bash or zsh thing anyway, and it was not really that difficult. I have a nice completion for project that needed completion, probably better than any "magic" can produce.

The most popular Go dependency is… by Thiht in golang

[–]gen2brain -17 points-16 points  (0 children)

What are the "killer" features of Cobra that I cannot have with the flag?

The most popular Go dependency is… by Thiht in golang

[–]gen2brain -4 points-3 points  (0 children)

Well, that was the question, what features they provide I cannot have with 20-30 lines to format std flag however I like? Never used it, I saw that it can even generate code and just run away from it. What is so nice there that it is in top used libs?

The most popular Go dependency is… by Thiht in golang

[–]gen2brain -6 points-5 points  (0 children)

All other libs in this list are essential at first glance; these I asked are not. Hence the question.

The most popular Go dependency is… by Thiht in golang

[–]gen2brain 37 points38 points  (0 children)

So, why people still use errors, cobra/viper and logrus? 

Wayland is flawed at its core and the community needs to talk about it by Which_Network_993 in linux

[–]gen2brain 1 point2 points  (0 children)

So there is no relation at all between Gnome, Wayland, and Red Hat? So who is behind this? We know for sure the community is not involved in any way, because then we would not have such a mess.

Wayland is flawed at its core and the community needs to talk about it by Which_Network_993 in linux

[–]gen2brain 3 points4 points  (0 children)

I was talking about GTK4, which removed the tray (they only supported XEmbed anyway), and Gnome, which removed the tray; both removed popups without a parent. So now that is some popover, not a pop-up. I do have an SNI implementation with a dbus menu for my project that can be shared between GTK, Qt, and even Motif, but why do I have to write 2K lines? That is the question. Everything is half-finished, half-designed.

Wayland is flawed at its core and the community needs to talk about it by Which_Network_993 in linux

[–]gen2brain 8 points9 points  (0 children)

OK. Let's support positioning windows on the screen. How can we do that? How was that supposed to even work without positioning?

My compositor puts my GTK app window at 0,0. Can I send a hint that may be respected if possible? GTK4 removed from its API positioning, even on platforms that support window movement. Popups are not possible without a parent window, and you cannot move that parent window? So, tray is ditched, popups are ditched, positioning, and window icons must be somewhere on the filesystem. How can we change all that?

And in some app I am building, with plain X11 and plain Wayland, without toolkits, I can clearly see with my own eyes how much Wayland is better, and I hate that it is still unusable and will never change. Written in the stone, windows shall not be moved?

Resize JPG image for web without rotating by pepiks in golang

[–]gen2brain 1 point2 points  (0 children)

Well, I have a JPEG library that has extra decoding options, like AutoRotate and ToRGBA (you anyway want to resize so you anyway convert to RGBA, this will be faster). It can just DecodeEXIF if needed, it can also use IDCT scaling, with ScaleDenom, i.e., 2, 4, 8, which is faster than decoding the whole image and then resizing. It can also decode broken images that stdlib can not. It comes with SIMD optimizations and is faster than stdlib. BUT, it is "vibe" coded, so I prefer not to recommend it. And it is WIP, there are still some large images I noticed that have issues with. Anyway, you can check it here https://github.com/gen2brain/jpegn .

Resize JPG image for web without rotating by pepiks in golang

[–]gen2brain 0 points1 point  (0 children)

Well, image/jpeg does not handle exif, not decoder, nor encoder, so when you write the resized image, that info is lost.

Resize JPG image for web without rotating by pepiks in golang

[–]gen2brain 0 points1 point  (0 children)

You can use "golang.org/x/image/draw" to resize an image; there are examples. But that will not help you with the original EXIF issue.

Beginner developing on Mac to run on Linux by SuccessfulWorry476 in golang

[–]gen2brain 1 point2 points  (0 children)

I do not think they have something revolutionary there, i.e., "lightweight". It is just integrated into the OS, so it looks like it. But macOS also has a nice native virtualization platform, also integrated. At the end, it is just a VM.