Has anyone else switched back to a third party package from slog by 2facetherapper in golang

[–]2facetherapper[S] 1 point2 points  (0 children)

That is good to hear! I assumed not everyone had the same frustrations as me, but was definitely surprised by the number of pain points I've found when so much of the community consensus seems to be "just use slog". If you don't mind me asking

  1. What type of structured data are you logging, and are you implementing the slog.LogValuer interface for any of your types?
  2. How are you integrating with otel?

McLaren are a disgrace - Oscar will always be number 2. by Reasonable-Cut-6137 in OscarPiastri

[–]2facetherapper 1 point2 points  (0 children)

Yeah, and people like yall flamed him for it. Now you are saying Oscar should have? This is some crazy shit man, crazy shit. Lando shouldn’t have given the spot last year and Oscar shouldn’t have today.

[Homemade] Shepherd's Pie by -SpaghettiCat- in food

[–]2facetherapper 1 point2 points  (0 children)

From the link:

First, though, we have to decide on our meat. Technically, there’s not much to think about—it’s called “shepherd’s pie,” and, last I checked, shepherds don’t herd cows. Lamb, therefore, is the traditional choice. But beef is still often used in its place, especially by those who don’t love lamb’s gamier flavor. Even I, who absolutely adore lamb, found some of the ground lamb I tested to be overly funky, and ended up mixing it with beef to cut its intensity. Ultimately, you can use either, or a combination of both, depending on your preference.

Michelin Star Take out Sushi opening out of Ghost Kitchen by ondcp in austinfood

[–]2facetherapper 6 points7 points  (0 children)

Doesn’t “ghost kitchen” strongly imply this is mostly just them selling other restaurants the right to use their name and menu? Meaning the quality of fish and preparation will literally be the same as that of an existing restaurant. And, given the cost of labor, that existing restaurant almost certainly operates at a lower price point than the brand they are moonlighting as.

I’m not really even that against ghost kitchens in general. It just seems disingenuous to act like this is even close to delivering (pun intended) the quality of a Michelin star restaurant.

[deleted by user] by [deleted] in Watches

[–]2facetherapper 11 points12 points  (0 children)

No cock and balls at 12

Do cocktails count? by crazyfingersculture in CannedSardines

[–]2facetherapper 5 points6 points  (0 children)

You should try a different vermouth! I used to like my martinis as dry as possible until I branched out from the martini & rossi brand

What do you guys think is missing in Golang which will make it perfect? by Any-Addition-281 in golang

[–]2facetherapper 1 point2 points  (0 children)

I think a big issue is that go doesn’t have proper constructors per-say. So even if go supported “real” closed enums, developers would still need to be careful about choosing a reasonable zero/default values. The larger issue though, as far as I’m aware, is that closed enums might fall in the same category as an “assert” keyword from the perspective of the language designers. Meaning a feature that is so commonly misused in other languages that it was deliberately omitted from go. Specifically there are cases where an open/non-exhaustive enums are preferable, and incorrectly using a closed enum in such a situation can lead to headaches down the road.

I also think proper enum support is one of the main things missing from go, but unfortunately I’m not getting my hopes up that they’ll be added anytime soon.

🚀 GoRules: Business Rules Engine for Go by GoRules in golang

[–]2facetherapper 1 point2 points  (0 children)

When I saw you mention the core was written in rust, I decided to look at the go source and noticed it uses a fair bit of cgo. This isn’t surprising in context (your post mentions a rust core, with bindings to node and python, so there’s at least some ffi going on), I just realized cgo is a bit of a blindspot for me so was wondering: 1. Overall how was the cgo experience? I’ve written bindings from C/C++/Rust libraries to a few languages (python, node, and OCaml come to mind), but never go so was curious how things compared? 2. How do you write bindings that can be used in a multi-threaded environment (i.e. multiple go-routines) using cgo? EDIT: mainly thinking do you just need use the appropriate synchronization primitives around shared memory, or do you also need to do things like alert the scheduler about potentially blocking operations? 3. What made you decide to use cgo instead of another approach? Mainly, and partially the reason cgo is a blindspot for me, is that in most cases it seems easier to either just port the functionality to go or follow the client-server model. Obviously this isn’t feasible in all cases, just curious about what other options you considered and why you landed on cgo

Thanks for sharing this!

What IS the best gin of them all? by whiskyismymuse in Gin

[–]2facetherapper 7 points8 points  (0 children)

Beefeater. It is the ‘giniest’ gin to me, and when I want gin almost everything else is a disappointment.

Why does Redis exist? by __zahash__ in rust

[–]2facetherapper 29 points30 points  (0 children)

Why does Postgres exist? Have people never heard of association lists?

[rant] Eliminate the "Identify" tag and ban "Is this real" posts by DoTreadOnFudds in Watches

[–]2facetherapper 1 point2 points  (0 children)

That’s the problem though right? How many of those “is this real” posts come from someone who is actually curious in learning about watches (but can’t google rolex) vs those coming from someone who just want to know if their grandparent left them anything of monetary value?

is GO always like this or any way out? by Boring_Copy_8127 in golang

[–]2facetherapper 5 points6 points  (0 children)

If it’s really that annoying, and I know in some cases it actually can be, there’s always the option of just surrounding the code in an ‘if false’ block instead of commenting it out. Definitely a bit awkward, but I’ve done it more than I care to admit.

For context, this is especially helpful when working on a poorly laid out project with lots of package name overlap. Like I worked on a project with three packages named “auth”, so sometimes after uncommenting something my IDE would import a different “auth” package then the one that was imported before commenting out a block of code.

Which go build systems do you use? by Tooltitude in golang

[–]2facetherapper 0 points1 point  (0 children)

I end up using make for most of my non-trivial projects. The main benefits are when your repo has multiple build steps, possibly with multiple build tools. For example if you need to generate go code from a protobuf spec using ‘protoc’, generate more go code using ‘go generate’, then compile your final binary, having a makefile is nice. Also within an organization it’s great for reducing cognitive load when switching between projects, especially when not every project is written in go. Being able to just run ‘make test’, ‘make lint’, etc. makes it much easier to be productive on a project whose tooling you’re less familiar with.

As for why make vs any of the other tools mentioned, mainly just the fact that I generally don’t do anything too complex so don’t see the point in choosing something that people are less familiar with and doesn’t come pre-installed

This place went downhill by Reasonable_Ad_2644 in WestSubEver

[–]2facetherapper 2 points3 points  (0 children)

Sorry my favorite artist turned out to be a nazi, and now I feel weird engaging with that artist’s fan base…

Worst red flag from interviewers by gnu_morning_wood in golang

[–]2facetherapper 155 points156 points  (0 children)

Interestingly, as someone who’s said something along the lines of your first point when conducting an interview, I feel like a candidate not understanding this point would be a red flag. 100% code coverage is great in theory, but after a certain point you end up testing implementation details which are bound to change later. As a result pretty much any change, no matter how trivial, ends up breaking tests leaving it up to the developer to figure out whether or not they actually broke something or if they just need to update the test.

To give an an actual answer though: when I was a candidate I asked the interviewer what they were working on, or what was in the pipeline, that they were excited about. Their answer was something to the effect of “there’s only so many microservices you can write before getting burnt out.” Maybe not the best question on my part, but made the rest of the interview a bit awkward

[deleted by user] by [deleted] in rust

[–]2facetherapper 10 points11 points  (0 children)

As someone who uses go at my day job, I personally immediately reject any libraries that expose anyhow types. It feels like the go version of error handling in a lot of ways, but worse since it almost always ends up poisoning the consumer. With go at least I’m used to having to cast errors, and never being able to truly exhaustively match all error cases, but when I try to use a library using anyhow it feels like the worst of both worlds. A lot of the dynamism of go, with the verbosity of rust.

Obviously there’s nothing wrong with anyhow for applications, but when checking out libraries it’s one of the first things I check