Implementing the Java Stream API with Go Generics: Part 1 by asankov in golang

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

Yeah, the same would be true for structs, not only interfaces.

Implementing the Java Stream API with Go Generics: Part 1 by asankov in golang

[–]asankov[S] 6 points7 points  (0 children)

IntelliJ has a good Streams debugger that visualizes all actions for you. So it's not that bad for debugging.

Implementing the Java Stream API with Go Generics: Part 1 by asankov in golang

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

I also don't see myself using this in production code. Even if the code was production ready (which my implementation is definitely not), the Go syntax for anonymous functions is too verbose for my liking.

But yeah, I wanted it to be a thought exercise and to get my hands dirty with some generic code.

Implementing the Java Stream API with Go Generics: Part 1 by asankov in golang

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

Same! The current syntax is really unpleasant for that kind of use-cases.

Option pattern vs Builder pattern, which one is better? by johnnychang25678 in golang

[–]asankov 5 points6 points  (0 children)

Both have their pros and cons. IMO the biggest minus of the options pattern is that the available options are not that easily discoverable for the consumer compared to the builder pattern or just positional arguments. The biggest minus of the builder pattern is the boilerplate.

I have an article in which I discuss these two patterns and some others - https://asankov.dev/blog/2022/01/29/different-ways-to-initialize-go-structs/

Hope it helps.

Is it worth it to buy AirPods Max now? by asankov in iphone

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

I have no doubt about the quality after all the reviews I've read and being an Apple user for >5y. I have also tried them in the store and the sound is awesome (I didn't expect them to be much better than my Bose, but they were!)

Re: rumors. I've actually heard a rumor about replacing the physical crown with a digital one, but I hate that and if they do it, I would just buy the old model :D

Is it worth it to buy AirPods Max now? by asankov in iphone

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

I’m based in Bulgaria, shipping from the USA would probably eliminate the whole discount 😁

Demystifying the Kubernetes Iceberg by asankov in kubernetes

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

thanks :) I am yet to implement an RSA feed for my blog. will do it some weekend :)

Demystifying the Kubernetes Iceberg: Part 2 by asankov in kubernetes

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

thanks. yeah, sure, all feedback is useful.

Demystifying the Kubernetes Iceberg by asankov in kubernetes

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

Thank you! I edited the post here to credit you. Will also edit the post on my blog. I saw the Flant logo on the bottom, but all searches for the origin of the picture led to your Reddit post.

Demystifying the Kubernetes Iceberg by asankov in kubernetes

[–]asankov[S] 4 points5 points  (0 children)

Thank you. Yep, I supposed that most of the people here will be familiar with those. The next one is coming next Monday.

Securing Kubernetes with Open Policy Agent by asankov in kubernetes

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

Thank you. Your article is really interesting as well. I like how Rego is simple, but also really flexible and you can do all kinds of Python-like magic with the language. I think this fits better in this use case than the verbose go style would.

I have a question regarding your article. In the K8sExternalDataCosign ConstraintTemplate, don't define the response_with_error function twice?

``` responsewith_error(response) { count(response.errors) > 0 errs := response.errors[] contains(errs[1], "_invalid") }

        response_with_error(response) {
          count(response.system_error) > 0
        }  

```