418 karma · joined November 22, 2012
2. Impure?
3. That's the point. It's to force people to stop using maps as if they're sorted.
4. Why would you want to rely on the arbitrary nature of a hash table for order?
5. That's the best type of boilerplate. It's short. It brings clarity. You might not need custom sort functions. The sort package supports basic types, which you'd use if you're keeping track of an index with []int for instance. https://golang.org/pkg/sort/
func it(n int) []struct{} {
return make([]struct{}, n)
}
// ex. 1:
for range it(10) {
fmt.Println(".")
}
// ex. 2:
for i := range it(10) {
fmt.Println(i)
}Video about it (Nov 2014): "Implementing a bignum calculator" https://www.youtube.com/watch?v=PXoG0WX0r_E
b := &a
fmt.Println((*b)[0])Answering your question isn't simple. I foremost think about how the lawmaking process itself could be changed to make it significantly harder to create superficial laws: the type of laws that interfere with consenting people; the type of laws largely responsible for so many prison economies and victimless "crimes." This doesn't answer your question. This is to say that it's a good question and it should be thought about.
- Supply and demand is a law not unlike Candy Crush is a post-scarcity economy.
- The Ferengi Rules of Acquisition are probably just guidelines, marketed as rules to sell more copies.
Personal desire for privacy is wholly separate from whether or not your duplicating a house harms me. It's baffling logic to suggest otherwise. But I'll play along. In this hypothetical, you value some data and I don't want you to have it. Therefore, our interests clash. Acknowledging reality on my end would mean attempting to safeguard the data from you. That means taking realistic measures to do the opposite of making it free or widely available for a price.
There's an intellectual world. There's a physical world. Ethics is not particular laws subjecting people at arbitrary points in time. Ethics is discussion of real-world damage and recourse. It's philosophy that must be perpetually debated before it swirls down a corporate drain along with any other semblance of "justice" flushed with it to churn out prisoners and chilling effects. Caring about reality starts with recognizing reality. Duplicating binary information is easy. Information can spread across the world in seconds. Some obstacles are effective at earning support and capital from information. Other obstacles are not effective. Security is generally weak. Some people are naturally curious and hungry. Some people suck. Most people are generally good. That's reality. People who have disposable incomes often want to encourage the producers they value -- with money, without friction. That's why crowdfunding exists.
The unethical people in these equations are the ones who try to bend the world to their whims of "intellectual" order. They see no problem with violence on human beings over literal duplication of information. Economically speaking, a lesser degree of unethical behavior surrounds only people who duplicate data who would have paid for said content. A minority of content spreads worldwide on that basis. Hundreds of millions of teenagers and adults getting online can barely afford an internet connection if even a personal computer. Meanwhile, the amount of content and producers exponentially increases. They are not "completely unethical" for taking part in fleeting, frivolous entertainment -- the vast amount of it they wouldn't deem worthy to purchase in place of other choices. Everyone's situation is different. Rarely in the human condition is something "completely unethical", especially in the context of data and non-violent actions. Streaming services like Spotify are a good start. They respect the nature of information more. They try to appeal to hearts and minds. That's healthy.
Then there are industries where net positives exist along with piracy. Growing the size of a user/fan base becomes an added dependency of future success. Industry sets adoption. Adoption sets industry. Piracy by individuals is tolerated or even internally respected, while only the piracy of moderate and large businesses is targeted. The world, for instance, was awash with Windows cracks and serials in the 90s and early 2000s, having a tremendous impact globally on people who couldn't afford it or who wouldn't buy it. In the absence of such piracy, such as by a hypothetical corporate-fascist state putting people to death or by magical DRM, Linux would be in millions of more households by now.
The Go article has some fair points. Yet, most of the reasons the author discounts Go are reasons I prefer Go. Its minimalism is a virtue. I'm grateful that it ignores a lot of research overload. It's grounding. I see more and do more in it. Reading people's code and the standard library itself isn't painful. Go is versatile. Systems don't sum it up. In my view, it'll have a healthy stride in a lot of other areas outside of networking and the web, given time (e.g. desktop GUIs, mobile, games, game servers, etc.). In 10 years, we'll have exhausted all letters and be back on C.
https://www.youtube.com/watch?v=48kP_Ssg2eY
It depends on your actual goals. Personally, though I prefer Go for everything when possible, my favorite alternative to C++ is C++. If you want a true alternative, Rust is probably a smarter investment of time compared to D, based on traction. However, I'm uninformed about the D community as of late, and certainly won't be surprised of a future surge.
I can't think of a great example. It can apply to anything. Though your larger point stands, C++ is a not so great example. Many languages are roller coasters or extremely specialized. In contrast, C++ is on another upswing with C++11/14/17. It's used practically everywhere, especially in graphics, systems, and game development. A point worth mentioning is that good C and C++ developers are often capable of adapting to other languages and settings quickly. They're used to a lot of basic building blocks.
> It's not good, but I'm not sure the alternative is better.
I prefer the alternative of not abusing people. I prefer an alternative of not stripping away choice and any remaining sovereignty people have. The alternative strives for peace in reality. Undoubtedly, calling a drug war a "jobs program" will sell its violence. There are many ways to package sadism.
Wars on drugs are abysmal entirely. Among many primary sources of havoc and waste on earth that such law creates, arguably the most reaching is its impetus to imbalance power and destroy individual rights and expectations of everyone. Mentality snowballs. A large portion of society is trained to accept increased authority and violation. They laugh at people who attempt to peacefully resist and exercise any remaining rights they have left in the face of 'deletion.'
Stevia, the plant, is not new. Menacing industry in that equation is artificial sweetener interests that used government(s) to ban importation and ban the option to label stevia as a sweetener in the United States and elsewhere. It was still widely sold, bought, and consumed. Strains vary. Some have a bitter aftertaste. Some are bred to be mostly sweet with minimal aftertaste. Whether it's consumed as dried plant matter, ground, or as newer extracts, a wide sampling sifts out tasty, palatable strains.
> I am fine with it being on the market...
I'm fine with lettuce being on the market. It's smart to be skeptical about everything, especially on an individual level, and more so given your experience. I avoid artificial sweeteners, also. Not enjoying the taste helps.