8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions
comment 2y ago · link · parent
comment 2y ago · link · parent
There was certainly a fad when social media was new to get all worked up about finding out about something someone did in the past, where people were even losing their shit over something that would normally be innocuous like a photo of a teacher enjoying a beer at a party. But, I think we're kind of over it at this point. Fashion trends don't last forever.
comment 2y ago · link · parent
Consider the case of (T, error). T should always be useable, regardless of error. At very least, if there is nothing more relevant to provide, the function should return the zero value for T. And we know that in Go the zero value is to be made useful. Go Proverb #5.
In practice, this often means something like (*Type, error), where the zero value for *Type (nil) is returned on failure. In which case the caller can check `if t == nil`. No need to consider the error at all. It is there if your requirements dictate a need for the error (e.g. reporting the failure), but for using the result it is entirely unnecessary.
If you leave the caller in a state where T can be invalid, you screwed up horribly or are purposefully being an asshole. Don't do that. That is Go 101 type stuff.
comment 2y ago · link · parent
While Marx believed that was necessary to see post-scarcity, it very well could be that he was wrong. This may come as a surprise to you, but he wasn't an all-knowing genie, just a feeble human. At this point in time we seem to be going down the right road without needing to do that. As before, I think we can agree that American innovation has brought us closer to post-scarcity than anything else the world has ever known.
If you are trying to say that Harris isn't a Marxist, then sure, that's fair. But we're clearly talking about "communist", not "Marxist". That these words happen to share the same last three letters does not imply that they are the same word.
If you are trying to say that Harris isn't a member of the Communist Party, as an earlier poster seemed to mistake, that is also fair. Clearly she is not that either. But, again, we're talking about "communist" not "member of the Communist Party". It is possible for a communist to be a member of the Communist Party, just as a liberal may be a member of the Democratic Party, but being a communist/liberal does not imply alignment with a political party. For our Canadian friends, being a liberal does not imply support of the Liberal Party either. Ideologies and political groups are quite distinct from each other.
> Communism is not about post-scarcity, to the contrary. It's an economic system that seeks to distribute finite resources equitably
Perhaps you just phrased it poorly, but communism is more of a lack of a system. It doesn't even have a state to administer a system! Those things go away when you have post-scarcity, naturally. Communism is not about post-scarcity, but you need post-scarcity to allow it to happen. You fundamentally cannot go stateless, classless, and moneyless without post-scarcity. Hence why communists seek post-scarcity. It is the change that ushers in communism.
> So arguing that any of Harris or Trump have anything to do with communism is either very dishonest or coming from a place of deep ignorance.
Or just boring old semantics. That is what you seem to present here, offing that Harris is not a communist simply by redefining communist (granted, it appears as though you may be struggling to get out what you are trying to say, so it might just be that).
Regardless, I spelled out my definition. Even it is not the same as your pet definition, it is the one that was given. The context is set. Under that definition, how is Harris not a communist?
comment 2y ago · link · parent
The product is not a full-stack web application. What makes you think that they brought in people with that kind of experience just for this particular feature?
Especially when they claim that they chose that route because it was what was most convenient. While you might argue that wasn't the right tradeoff, it is a common tradeoff developers of all kinds make. “Make It Work, Make It Right, Make It Fast” has become pervasive in this industry, for better or worse.
comment 2y ago · link · parent
But it seems most programmers here are only around for the MVP and are content to let the future of maintaining their garbage be someone else's problem. Which, I expect, is also the fundamental aversion they have to Go, which is trying to create a world where you still want to work on the same codebase in 30 years.
Not that Go is perfect. It most certainly isn't. But you are going to spend more time obsessing over things that aren't even all that important in practice when your "launch and dash" lifestyle is being threatened.
comment 2y ago · link · parent
I know of no programming language that provides a consistent way to deal with values correctly, if the venerable if statement (or whatever is equivalent) is not it.
What is this magical fairy language that you speak of or envision?
comment 2y ago · link · parent
It is just not tenable where latency poses a practical constraint under an implementation that is not theoretically sound. There are plenty of hacks to work around it, though, so it is not really a problem in practice. To call those hacks to work around a system with shortcomings "using the database properly" is a bit of a stretch, though.
Just so we're clear, the use of JOIN, IN, etc. are not hacks in and of themselves. They serve a purpose even where latency doesn't exist. But when applied to solving the N+1 problem, their use is a hack. Again, one that gets the job done and solves the problem – hacks aren't bad, but is not theoretically sound. If you did not have latency constraints to contend with, you would not prefer it.
The better question is: Why use a database that sucks? Latency periods are small enough in SQLite, for example, that you don't have to worry about the N+1 problem in any real-world situation. It doesn't have to be a problem in need of hacks.
comment 2y ago · link · parent
Go on. What does the word mean?
It is oft associated with "member of the Communist Party", of which Harris clearly is not. Perhaps that is what you are thinking of? But that usage is like calling a member of the Democratic Party a liberal – something that is also often done. But to be a liberal does not automatically make you a member of the Democratic Party, even if members of the Democratic Party are often liberal.
> but that's neither the main goal, nor the means.
What is the main goal, then?
The means is undefined. Different communists have different ideas about how to achieve post-scarcity. The Communist Party has a particular stance about that, certainly, but as before, while members of the Communist Party may be communist, not all communists are members of the Communist Party.
comment 2y ago · link · parent
Assuming the function author followed Go conventions, you never need to consider the error for the sake of using the function. Granted, there are some bad developers out there who will do something strange that will come to bite you, but that is not limited to errors (or any particular language).
You may still need the error for your own application requirements, but application requirements are pretty hard to forget. At very least, you are going to notice that your application is missing a whole entire feature as soon as you start using it.
comment 2y ago · link · parent
Indeed. Women are socialized to seek men of higher status as a partner. Thus men feel the need to seek higher status to become an attractive mate. And so men "infiltrate" any position that offers a chance at higher status (at least where high pay stands in as a proxy). Likewise, men are socialized to seek women with beauty rather than status, so there is little imperative for women to seek professions of status, but do benefit from careers that will preserve their beauty – so something like welding in a harsh environment that is hard on one's health is not a top choice.
That said, the social norms do seem to be changing. It appears the younger generations aren't coupling up so much anymore, and if that trend continues attracting a mate may no longer be a consideration.
comment 2y ago · link · parent
Did they? You seem to only be able to go back to 2021, whereas I was seeing substantial gains in the price of food I was selling on the farm as early as 2019, thanks to another devastating (albeit less so) crop failure.
It is not like the price was $x one day and then $x*2 the next. It ramped up over time. Just like the price of groceries did, albeit on a later timeline.
comment 2y ago · link · parent
Well, are they wrong? Once you get past the stupid rehtoric associated with the word, the goal of communists is to usher in an age of post-scarcity.
The United States is clearly leading that charge. Food production is the closest thing we have to post-scarcity, and that's almost entirely thanks to the efforts of US innovation. I even dare say that US innovation in general is doing more for bringing us closer to post-scarcity than anything else seen in the world. Harris seems/seemed on board to see that continue.
Trump may be too. He appears to also stand behind American innovation. Although, perhaps to the determinant of innovation elsewhere, which does set him apart from Harris, and, to be fair, you might argue that leaves him unaligned with the communist intention.
comment 2y ago · link · parent
Hell, look at how long it took grocery stores to react to the aforementioned food crisis. Us on the farm saw the price of food we were selling double (or even more) from the price norm early in the crisis, but it took another year or so before the consumers of that food started complaining about how much grocery stores were charging. Things happen very slowly.
Indeed, the money supply has been stable for a while, only veering of track for a short time, but inflation is also now stabilizing and only veered off track for a short time.
comment 2y ago · link · parent
I'm not sure that is fair. Nothing is ever caused by just one thing, of course, but it is unlikely that money printed and given to average Joes was not a significant contributor. COVID relief saw money flow into the hands of regular people, which was quite unlike 2008.
2008 was different as it only went into the hands of the rich. You can print money endlessly and give it all to Jeff Bezos and inflation will never occur. It's just another number in his bank account, so to speak. But if you give it to poor people on the street, soon they are going to start buying things with it, increasing competition for goods and services and thus driving up prices.
Although I would say the biggest factor was the devastating crop failure in 2020 with a dash of COVID problems on top, followed by the EU shutting down their fertilizer plants in 2021, and then Russia invading Ukraine in 2022 which both complicated access to Ukraine food production as well as denying trade with Russian fertilizer. This left food stocks in a precarious situation and thus sent the price of food to the moon. Everyone else followed as best they could to ensure they could continue to eat. Now that we're getting our food house back in order, the inflation panic has started to subside in kind.
comment 2y ago · link · parent
comment 2y ago · link · parent
No doubt the same reason it is also critical in Haskell (see comment about isLoggedIn function): Developers not knowing what they are doing.
If you work within the idioms and generally accepted programming practices this isn't a problem. It only becomes a problem when you get a developer who wants to "go their own way" without understanding why the norms exist. The linter is a crutch to support their "bad habits".
comment 2y ago · link · parent
It can become extremely difficult to figure out if you mar yourself with someone else's framework. That is quite true. But is also what the parent said.
comment 2y ago · link · parent
I'm not sure the syntax is all that significant. There have been numerous proposals, but the syntax was never the reason for rejection. It is that the entire concept is unusable in the state that it is understood.
That's not to say the problems can't be solved, but nobody has yet.
> It's very common to have a chain of these kinds of calls making up the body of a function.
Yes, like in Rust, for example. But it also has defined traits and other features on top of the chaining to deal with the same problems Go would suffer from it had such syntax. Theoretically Go could introduce the same, but it remains unclear how to do that in a way that makes sense in the Go language.
Again, there is probably a solution out there, but nobody has come up with it yet. Surprisingly, these kind of things aren't sent down from the heavens by a magical deity. It takes human effort, which isn't there because they are busy ranting on HN.
> It seems like "return err" is very useful for this pattern
Where would you find it useful (memes aside)?
comment 2y ago · link · parent
> Few people know Ruby and if you ask a company whether they want to hire PHP or Ruby guys, PHP wins because there's just more people who know it.
https://board.phpbuilder.com/d/10312349-php-frameworks-which... (First example I found, but was a common trope back in the early days of Rails)
comment 2y ago · link · parent
func checkPermissions(success func())
Like anything, you can still screw it up if you try hard enough, but it should nudge most in the right direction. The talk of error handling seems like a distraction or a case of someone confusingly trying to write code in another language using Go syntax.Obviously you are not forced to think of the user when designing an API, but you don't have to be mindful of the user in any language. Not even Haskell can save a developer who doesn't care, as noted in an earlier comment.