- rowanseymourWhat's the simplest replacement for mocking S3 in CI? We don't about performance or reliability.. it's just gotta act like S3.
- Israel continues to be shielded from the consequences of its actions.
- At analyzing and reproducing language.. words, code etc sure because at their core they are still statistical models of language. But there seems to be growing consensus that intelligence requires modeling more than words.
- Sabine Hossenfelder is really not convinced by this paper https://www.youtube.com/watch?v=GQwzJ9PWjL0
- I saw that bit about concurrent use of http.Client and immediately panicked about all our code in production hammering away concurrently on a couple of client instances... and then saw the example and thought... why would you think you can do that concurrently??
- Exactly this. Disengaging from the injustices ongoing in this world will likely benefit your mental health but it's a choice and we don't need your essays justifying that choice, and you trying to convince yourself that it makes you smarter than everyone else.
- I can't think of good way to give programmers control over boxing without adding a bunch of complexity that nobody wants.. but it doesn't seem out of the realm of possibility that the linter could detect issues like this. It should be able to spot methods that aren't nil-safe and spot nil values of those types ending up in interfaces with those methods. Then you'd have less explaining to do!
- I don't know why every time people complain about this there is an assumption that we just don't understand why it is the way it is. I get that x can implement X and x can have methods that work with nil. I sometimes write methods that work with nils. It's a neat feature.
What's frustrating is that 99.99% of written go code doesn't work this way and so people _do_ shoot themselves in the foot all the time, and so at some point you have to concede that what we have might be logical but it isn't intuitive. And that kinda sucks for a language that prides itself on simplicity.
I also get that there's no easy way to address this. The best I can imagine is a way to declare that a method Y on type x can't take nil so (*x)(nil) shouldn't be considered as satisfying that method on an interface.. and thus not boxed automatically into that interface type. But yeah I get that's gonna get messy. If I could think of a good solution I'd make a proposal.
- Yeah CI tests and local dev environments for code that runs against S3 in prod. Right now sifting through the alternatives for whatever is easiest to run as a container in Github actions or docker-compose...
- Having pondered on a bit more.. I think it's the struct that would declare that it's not usable as nil, and that in turn would tell the runtime not to box it if it's nil. That would also help the compiler (and copilot etc) spot calls on nil pointers which will panic.
- Of all the things one might critique Go for as not being simple, I'm not sure this is it. I've never needed to serialize "-" as a key in JSON but `-,` makes some sense given the general pattern of field tags, e.g. `json:"name,omitempty"`
- That works until 1) you don't want to export the value types 2) the return values aren't simple structs but slices or maps because []x is not a []X even if x implements X.
- Agree the ship has likely sailed, but if it could be addressed wouldn't it be nice to remove nil value interfaces altogether? Maybe start by letting new interface types declare/annotate that they don't box nil values? Then one day that becomes the default. Oh well.
- It's fantastic concise language and standard library steered by people who are determined to keep it simple and intuitive... which IMO makes it all the more odd that it has this obvious foot gun trap where `!= nil` doesn't always mean what you might think.
- Ah the old nil values boxed into non-nil interfaces. Even after 8 years writing go code almost every day this still bites me occasionally. I've never seen code that actually uses this. I understand why it is the way it is but I hate it.
- "moving people" is a horrific way to obscure what is happening in Gaza today
- Raphael Lemkin, the guy who first coined the term "genocide", considered "cultural genocide" (the killing of a culture if you will), a central component of genocide.
Also, I don't know if you've noticed, but people generally resist being ethnic cleansed, and so the perpetrators have to kill a lot of them.
- "Both the definition and charge of ethnic cleansing is often disputed, with some researchers including and others excluding coercive assimilation or mass killings as a means of depopulating an area of a particular group, or calling it a euphemism for genocide or cultural genocide."
- To be precise.. empty slices and maps sometimes behave like nil (len, range etc) and sometimes not (inserting into a nil map). The former is a neat convenience, and I think extending that to JSON marshaling makes sense.
- I had a back and forth with someone who really didn't want to change that behavior and their reasoning was that since you can create and provide an empty map or slice.. having the marshaler do that for you, and then also needing a way to disable that behavior, was unnecessary complexity.