Rust is political? - Page 1
Forum section: electronics / general

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 19, 2022, 05:25:29 pm
content: I find this statement concerning:Quotehttps://twitter.com/rustlang/status/1267519582505512960

author: Stray Electron
author_rank: Super Contributor
timestamp: May 19, 2022, 05:49:18 pm
content: Don't know who or what Rust is and don't care. More nonsense (click bait) from another noisy Social Media company.

author: james_s
author_rank: Super Contributor
timestamp: May 19, 2022, 05:52:33 pm
content: Everything is political to people that are obsessed with politics. When all you have is a hammer, everything looks like a nail.

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 19, 2022, 08:03:30 pm
content: Languages are hard (to me, at least), as it is always a discovery to find out what people actually mean!In this case, I went towiktionary, to find out.If they indeed refer to political as "concerning or relating to politics, the art and process of governing", then it definitely is an alarming statement: in the same vein as claiming all human interaction is just a struggle for control and power.(As a counterpoint, I personally am not at all interested in controlling other people or having any power over them [beyond that we both agreeing that the intent of such interaction is to be mutually gainful, useful, and informative overall]. I havewishes, but being someone who is fully aware of their own beliefs and wishes quite possibly being inadequate/incorrect/wrong at this point in time, I havezerointent on forcing them on anyone else. The only thing I occasionally try to "force" is getting an acknowledgement for the underlying reasons for them, and that only so that there is at least a possibility for a mutually useful result from the interaction. I consider being proven wrong and having learned something new, a much better "win", than having happened to change someone elses opinion. Life, interacting with other people, became much less stressful, and much more fundamentally interesting, when I finally learned and adopted this attitude.)

author: eugene
author_rank: Frequent Contributor
timestamp: May 20, 2022, 12:09:57 am
content: It's unfortunate when a public person or entity uses whatever notoriety they have to make a political statement. Doesn't matter if I agree with them or not. That's not the point.Now I'm less interested in learning rust...

author: rsjsouza
author_rank: Super Contributor
timestamp: May 20, 2022, 01:29:59 am
content: Go woke and go broke I guess?People use these languages for reasons other than their stance on social and political issues. Opening this door will eventually lead to capable people leaving the bandwagon, tired of the policing and censorship about nuisances. This is not a matter of "if" but "when".These apparently innocuous and well intentioned initiatives already infected many technical working groups and organizations around the world.

author: AndyBeez
author_rank: Frequent Contributor
timestamp: May 20, 2022, 09:02:55 pm
content: Rather than "politicial", they may have meant Rust isegalitarian. An open source language for all platforms. Or maybe theRustlingsare now versioning their woke manifestos on Github? A Rustling is a person who programs in Rust; and may also be one who grew up as Harry Potter super nerd?My study interest in Rust is through Solana crypto smart contracts. Smart contracts are written in Rust and added as immutable links onto the Solana blockchain. Which makes Solana smart contracts... way more difficult to get right when compared with Ethereum's virtual machine smart contracts. ETH usesSoliditywhich is designed from the ground up to do smart contracts. Solana smart contracts grind rust lumps into shapes that kind of fit the function. But Ethereum's smart contractgasfees cost more than a real tank of gasoline, and SOL is real cheap. Hence Rust. AndCargo, the Rust package manager.Quote from: rsjsouza on May 20, 2022, 01:29:59 amPrint that on the blockchain, as an NFT

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 20, 2022, 10:13:14 pm
content: Whether you choose to accept/acknowledge it or not (see above), the fact that most everyone here lives in a modernized world economy, means everyone participates in the exchange of goods, resources and labor. Which is to say... is political.Indeed you have to go very far out of your way to truly avoid being political. You could minimize that by running off into the wilderness and living subsistence. Even that's not easy to do, as almost all land is claimed in some way, and so your use of that resource may not go unnoticed.And anyway, not making a choice (see above) is still a political choice. One that's very easily exploited by those who DO care about making political choices... and who have the means to implement their plans.Tim

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 20, 2022, 11:23:37 pm
content: Quote from: T3sl4co1l on May 20, 2022, 10:13:14 pmIs it? (This is a real question to me, not a rhetorical device.)Merriam-Webster,Wiktionary, andCambridge Dictionaryall refer to the art and process ofgoverningin the definition ofpolitical; they do not define it as just operating/acting within a governed society.In other words, the dictionaries seem to me to define the term as related to defining the rules of a society, and not as related to operating within existing rules of a society.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 20, 2022, 11:52:43 pm
content: Quote from: Nominal Animal on May 20, 2022, 11:23:37 pmFeels outdated to me, then. The usual things that people would consider "political" include merely discussing topic related to the above; while the above definition seems to suggest only literalpoliticiansdo any politic. Which is a bit absurd with respect to how I've seen the word used.Or we might put it another way and say, -- much as the rules of the English language evolve as it is spoke -- so too the members of a society define the rules of it to varying degree, and so everyone is political by association -- not just because they wrote something down on a piece of paper some other people consider important.Tim

author: MK14
author_rank: Super Contributor
timestamp: May 21, 2022, 12:12:57 am
content: Even C has a number of built in political things/statements. Such as:Code:<< ... Supporting far left>> ... Supporting far right++ ... Profit-- ... TaxesUB ... Declaring something to be like a politicianInt ... Unfairly discriminates against floating point peopleDouble ... Discriminates against unmarried Single peopleFor (..) ... For support of a particular party/political aim// ... Comment or No Comment? : ... Are you Voting for me or Not ?true ... It is True! ... It is NOT Trueexit ... Exit Poll Results

author: rsjsouza
author_rank: Super Contributor
timestamp: May 21, 2022, 12:23:48 am
content: Quote from: T3sl4co1l on May 20, 2022, 11:52:43 pmPolitics indeed happen in several subsections of the society where career politicians are not present (politics in the workplace, for example). Despite I think that politics are pervasive in our lives, since many of our actions during our regular relationships must employ politics as a way to either convince people/groups of your points-of-view or give-and-take in negotiations, the intention of the tweet is flawed. The tweet itself is somewhat dubious and innocuous, but the retweetwd post below evidences thetypeof politics the assertive wants to enforce and I find out of place for a language.

author: MK14
author_rank: Super Contributor
timestamp: May 21, 2022, 12:33:53 am
content: Quote from: rsjsouza on May 21, 2022, 12:23:48 amA computer programming language, should be free of biases, including political ones. I.e. It should be politically neutral (uninvolved with politics). Coincidental/accidental naming biases, it may have (Master/Slave/WhiteList/BlackList/Single/Related/DIM{low IQ, array sizing}) Etc.Should just be accepted as part of the language (especially if long established, many decades ago, and the naming is purely coincidental), and NOT given political reasons for demanding their removal from programming languages.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 21, 2022, 12:35:11 am
content: Yep, and it was apparently also discussed on a number of forums, so that was certainly not just a one-time "innocent" phrase.And no, tech is not political. That's an absurd statement. Political tech is political. The difference is significant.

author: Bud
author_rank: Super Contributor
timestamp: May 21, 2022, 12:53:15 am
content: Tech is full of politics. IT is full of politics. Sport is full of politics.

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 21, 2022, 02:10:15 am
content: Quote from: T3sl4co1l on May 20, 2022, 11:52:43 pmI disagree, but I'm not a native English speaker anyway.Discussion about governance and rules is political, of course. Supporting or opposing a course of action done using taxes is about governance, and thus political.Tools are not political. Creating a sign is not political until you put a political message on that sign. A sign that says "I sell apples for $1 apiece" is not political. Languages are not political, until you rule certain words and idioms allowed to be used by only a specific subset of people (because that is a course of action intended to control or govern people).I can understand, however, why and how the "vague-fication" of the term "political" can come about. One is the politicization of nonpolitical things – like claiming terms "master" and "slave" to be political regardless of the context, that all human interaction is only a struggle for power and control over others, and so on; whereas it is exactly the context that determines whether they convey a political or nonpolitical meaning. The other is gross misunderstanding of sociology and terms likeculture, which indeed actually does cover everything humans do. (Terms like "learned intelligence" and "emotional intelligence" are related: impossible and self-contradictory when examined at the definition level, and only constructed to evoke specific emotions in order to direct the discussion towards a specific political goal.)If you allow arbitrary redefinition of words without any means of keeping track of those changes, does that language have any real use anymore? I don't think so; it is just like spouting nonsense words and insisting that they have exactly the meanings you yourself define and nothing else. Because of this, I suggestcarefulspeech is paramount. Instead of claiming "X is political", say "X is political, becauseY", explainingYto the best of your ability. The former tends to lead to stupid, wasteful, and ineffectual word slinging; whereas the latter can actually cause something new to be discovered through interesting discussions. It is a pity humans are so enamored of instant messaging that so strongly encourages the former over the latter.

author: DiTBho
author_rank: Super Contributor
timestamp: May 21, 2022, 10:10:35 am
content: Quote from: AndyBeez on May 20, 2022, 09:02:55 pmor suPPa-powers, like suPPa-man

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 21, 2022, 03:15:52 pm
content: Quote from: Nominal Animal on May 21, 2022, 02:10:15 amI'll address both points:1. Apples.I hinted at the context in my first comment:Quote from: T3sl4co1l on May 20, 2022, 10:13:14 pmThere is no isolated act of "selling apples", just as there is no isolated act of "an electron moves 1mm through space". Why did it move? What else is moving?Consider such hypotheticals:A discriminated minority places a sign "Apples $1".The police come and beat them nearly to death, tearing the sign and smashing the apples.Was the sign a political act?A person places a sign "Apples $1".A line forms. The person witnesses a thief beat another potential customer, and steal their dollar. The thief moves to the front of the line.Does the person accept the dollar? Do they give the apple? To whom do they give it?Which one is a political act, if any?A person places a sign "Apples $1", knowing that their neighbor has posted a sign "Apples $2".Is this a political act?A person places a sign, "Apples $1". Large Fruit Company buys up all the neighboring lots and posts signs on them, "Apples $0.50". Both parties know $0.50 is selling the product at a loss, no matter how much efficiency (and migrant labor, and..) Large Fruit Company might bring to bear.Has a politic been committed?Does it matter if Large Fruit Company lobbied the local, state or federal government to obtain those lots?What if the migrant labor refuses to work for such a pittance, the police are called, and they get deported; several subsequently contract debilitating diseases on their way back to, or in, their returned countries; several others die of gang violence; still others die of various other problems in their returned countries?There are more combinations and permutations than I can possibly name, and enough of them connect, directly, or 2nd or 3rd degree, with the governance of society, so that it's not even very useful to distinguish between them; hence, everything is political.2. Language is being used to rule us, right under our noses. This may not be as apparent to you, but the US is unfortunately festering with it. Example:https://www.cnn.com/2021/07/08/politics/critical-race-theory-panic-race-deconstructed-newsletter/index.htmlCurrent targets include "CRT", trans and other LGBTQs, and even accusing opponents of being pedos. By associating negative connotations to previously stable and meaningful terms, they deny their opponents the use of those terms. Accuse their opponents's arguments and statistics of being nothing but "conspiracy theories" (while peddling misinformation themselves). And the use of "every accusation is a confession", accusing opponents of doing things many of them have been credibly accused, or convicted, of.A recent microcosm of the latter, kind of in the opposite direction interestingly enough:https://www.reddit.com/r/facepalm/comments/usqb72/uhhhh_hes_all_yours/i9574e2/- Prominent figure announces alignment shift- Commenter wholly unimpressed; party better aligns with figure's values anyway?- Claims it's a distraction from something- Next day, oh what do you know:https://www.businessinsider.com/spacex-paid-250000-to-a-flight-attendant-who-accused-elon-musk-of-sexual-misconduct-2022-5- What do you know, new party better aligns with figure's actions tooSo, not all of these strategies specifically use the distortion of language, but are used as rhetorical devices and so are related, worthy of note.Tim

author: MK14
author_rank: Super Contributor
timestamp: May 21, 2022, 03:46:27 pm
content: Quote from: T3sl4co1l on May 21, 2022, 03:15:52 pmThat's NOT political. I think you are overthinking the situation. Just because a 'safe', 1.5 volt AAA battery, is NOT generally considered to be an electrical safety risk (with rare exceptions, such as fire hazard risks, or dangers if swallowed). Worrying about, what if the 1.5 V battery ***could*** be unsafe, as someone ***might*** connect it up to a live, 1,000 volt power source.It WOULD be political, if it said "Apples $1, only for sale to 'good' Christians, who have gone to prayers this week, and NOT for sale to purple people, with green/blue stripped skin colour".TL;DRA sign that says "Apples for sale, at $1", is a sign that says "Apples for sale, at $1". It is arguably the people who start claiming it IS POLITICAL, that I think are starting the problems in the first place. E.g. Complaining about technical things being called Client/Server, because of possible relations to previous slavery (Server/Master/Slave/BlackList/WhiteList/Male/Female{connectors} etc) things. Although, it is possible that consideration of some technical terms, **might** be appropriate, but I hope not.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 21, 2022, 03:57:56 pm
content: I mean, I can only explain the concept. If your mind is closed to it, you don't have to brag to the world that you refuse to accept it. It's... not a contest?Tim

author: MK14
author_rank: Super Contributor
timestamp: May 21, 2022, 04:25:53 pm
content: Quote from: T3sl4co1l on May 21, 2022, 03:57:56 pmUnlike Maths/Science and Electronics, much of the time. Where many answers, are somewhat fixed and in general agreement, with most people. In many cases they can be proved/validated, or at least experimental evidence can be gathered, and conclusions made.Political things, tend to be much more subjective, with many people offering lots of different opinions.So, I don't think saying things like "closed minds" and/or "bragging to the world". Are the best/right way of handling situations, where peoples opinions/ideas on political things differ.

author: tszaboo
author_rank: Super Contributor
timestamp: May 21, 2022, 04:35:13 pm
content: Quote from: T3sl4co1l on May 21, 2022, 03:15:52 pmNowadays, with cancel culture, I cannot even express my true thoughts anymore.Some jaded * , who had the twitter account for Rust just decided: "Now I have enough followers, it is time to retweet Defund police propaganda"If you every wrote that you like Rust, now you are labeled.BTW, if you search a little on the internet, I'm fairly sure that we would find that apple (the fruit) is fatphobic and racist. Cause that's the world we are living in. I want my Web 2.0 back.

author: MK14
author_rank: Super Contributor
timestamp: May 21, 2022, 04:54:16 pm
content: Quote from: tszaboo on May 21, 2022, 04:35:13 pmIt is important that you do, to keep freespeech alive, well and kicking. Otherwise, it can cause issues, in the short and long terms.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 21, 2022, 05:18:55 pm
content: Quote from: DiTBho on May 21, 2022, 10:10:35 amActually, I think they tend to refer to themselves as "rustaceans". Don't ask.

author: AndyBeez
author_rank: Frequent Contributor
timestamp: May 21, 2022, 05:53:06 pm
content: Rustaceans indeed. Rustlings are newbies. Like me. It's also a Rust languagd tutorial projecthttps://github.com/rust-lang/rustlings/I suggest the difference between Rust and C++ is Rust is loaded with a suPPa excitted developer community that's just suPPa excitted!!!!!I don't think I will be sticking around. Politics or not.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 21, 2022, 06:17:18 pm
content: Quote from: AndyBeez on May 21, 2022, 05:53:06 pmAh, OK!Quote from: AndyBeez on May 21, 2022, 05:53:06 pmThat seems so.But to be completely fair, just have a look at CppCon talks. And then at Rust conference talks. There's pretty fun stuff in both. Granted the Rust crew sounds a bit more excited.

author: Zero999
author_rank: Super Contributor
timestamp: May 21, 2022, 08:27:36 pm
content: Quote from: Nominal Animal on May 21, 2022, 02:10:15 amThe users and developers of software are political though.Open source developers tend to be more left-leaning. Writing software so it can be shared with everyone, to benefit society is a socialist principle. This is bound to affect some of the decisions made and how the documentation is worded.

author: coppice
author_rank: Super Contributor
timestamp: May 21, 2022, 08:34:29 pm
content: Quote from: Zero999 on May 21, 2022, 08:27:36 pmI've never found this to be true. However, if you get some momentum with an open source project a lot of political hangers-on will try to muscle in and make life a misery for the productive people. Too many productive people are too timid to tell the scum just where to shove it.

author: MK14
author_rank: Super Contributor
timestamp: May 21, 2022, 08:36:20 pm
content: Quote from: Zero999 on May 21, 2022, 08:27:36 pmNot necessarily, it can work BOTH ways. Some open-source projects (free), seem to have partially capitalistic (right-leaning), reasons for open-sourcing (and making it available for FREE). Because they use other ways of generating money, in a business sense.Such as selling support (e.g. SQLite), full-commercial-use-and-modify-source-code-privately-licences (for money, e.g. QT), etc.Or alternatively, a significant proprietary/business, may have its own reasons, for wanting free versions, to be freely available. E.g. Microsoft, making web browsers, available for free. As (it was rumored/believed by some) they were worried, that if companies could become large, by making big profits from web-browsers, they could compete/harm Microsoft's profit line.

author: Zero999
author_rank: Super Contributor
timestamp: May 21, 2022, 09:18:01 pm
content: Quote from: MK14 on May 21, 2022, 08:36:20 pmGood point. I admit I'm basing my experience on a now defunct, pro-Linux/anti-Microsoft forum, I used to post on many years ago, back when Internet Explorer was king. Many of the people where, who were involved in developing open source projects, had left wing views, which I suppose shouldn't have been surprising.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 22, 2022, 01:55:13 am
content: Quote from: Zero999 on May 21, 2022, 08:27:36 pmThis is a questionable generalization IMHO. People may have myriads of reasons for open-sourcing or not open-sourcing some project. What you said here is just one possible reason among many.While sure, some people may do it solely for the greater good of society with all pure intentions (which you may or may not associate with political left, which would be yet another debate), a very common reason some people decide to share source code is to potentially get a full team of developers for free. Both reasons are not even contradictory, of course, but the latter happens to often prevail. From my experience anyway.That said, I do agree that open-source inevitably comes with some politics. But that's the point of this thread: I absolutely do not agree with the fact that "tech is political" in general. As I said earlier, political tech is political. With your example, choosing a license for a given project certainly has a political aspect to it. Choosing a license is the political act here, if you want to see one. It's not the underlying tech that is being developed (except in the very rare cases for which said project would be clearly dedicated to some political battle, then sure, but this can't be the case for a general-purpose language, unless we've been lied about the fact that it was one.)Just a thought.

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 22, 2022, 03:20:54 am
content: Quote from: Zero999 on May 21, 2022, 08:27:36 pmI haven't seen any statistics on that, so I don't know which way devs tend to lean. I personallysuspectthat the age-related distribution (youngsters tending to lean more to left, older more to right, as their personal situations and experiences change) is stronger than developer licensing choices.Quote from: Zero999 on May 21, 2022, 08:27:36 pmOnly on a surface level –– but that is definitely not the reason I ever choose to apply a "copyleft" license.The core of socialism is social ownership of the means of production, as opposed to private ownership. Those who respect copyrights, know that the only one who can choose to distribute software under a different license than the original, is the author. (In cases where there are multiple authors, they all must agree.) Therefore, the very core of copyright licenses is based on copyright law and private ownership.True socialists would never respect copyright! They would consider software to 'belong to the people' anyway.Consider theFree Softwaremovement championed by RMS. It is not about the software having zero price, or that it is available to all. It is about the end users that have obtained the software to have the liberty to run and modify the software, to have full control over their hardware. At its very core, it is not social or socialist, it is reallylibertarianinstead.(In political terms, you have a big difference between GPL and BSD licenses. GPL allows distributing derivatives under the same license –– share-alike; sources must be available to those you distribute the derivative to ––, but BSD licenses typically do not require sources to be distributed as well. Thus, one could argue that GPL is viral and capitalistic because it emphasizes the rights of the original author and end users, but not other developers; whereas BSD emphasizes the rights of other developers.)I use a number of different licenses all the time:CC0-1.0: No copyright.I use this for all my examples (although I sometimes forget to explicitly mark them so), because I want others to use that or similar code to solve specific problems. I don't do it because I think it will make the world a better place; I use it in the hopes of having less buggy software at my fingertips. Pure enlightened self-interest.BSD Licenses: Permissive licensing.I use these for device drivers, in the hopes that I can in the future use that device (which I obviously already own) on different operating systems also. The driver is required but not commercializable: it is not feasible to charge separately for both the device and the driver.LGPL: Share-alike, but dynamically linkable to proprietary software.I use this for libraries. I maintain the copyright and can sell individual licenses (other than LGPL) for commercial purposes, but others can use the unmodified sources, or by providing also the modified sources of the library to those they distribute the modified libraries to. As shown by the Qt Company (a Finnish one, BTW), this can be a working business model.The reasons for doing this vary. I am quite self-centered, so I usually do this because I believe that applications that usemylibrary will be less buggy, and therefore more comfortable and nice for me to use.GPL: Share-alike.I use this for applications I do not charge money for. There are two main reasons for this: one is when I get paid by someone to create the application or tool. (That makes sense the same way co-operatives work: the client is assured that they can continue to develop and modify the tools to fit perfectly to their needs. I do and must provide sufficient documentation for this, though.) The other is when I believe the tool or application can make things better for me somehow. Not necessarily directly; it can for example open up completely new avenues for me to be paid to create such tools.Proprietary licenses, for COTS and other paid software.Even with these, I really like giving more liberty to the end users (but not to re-distribute the software). This is why I currently favour using e.g. Python 3 and Qt 5 for the user interface –– it being an interpreted language, an end user can make any changes to the user interface they want ––, and keep the important business logic and number crunching in native compiled code libraries. A major reason for this is that if one provides user support in some sort of a forum, one can also collect and evaluate the changes end users ask for and have provided. Instead of paying expensive consultants to hopefully come up with an user interface that end users like, you can make it a continuous process the users themselves help direct. Not only it can be cheaper, but depending on your initial user base, it can significantly increase the lifespan of the product.However, the most important point is how 'copyleft' developercommunitieswork.They are nothing like a socialist communeat all. One could argue that they're extremely capitalistic, except that the exchange medium is not money, but time, effort, and knowledge. (This is a very important point, because it is also the reason why so many people new to such communities get so frustrated with them. People are used tocustomer support, and naturally initially try to treat developers the same way; and that will backfire. Hell, we see the same here at EEVblog forums, whenever someone demands anything!And properly so.)The advice I often give is perfect illustration of such communities. I always tell people to provide maximum amount of information, and show that they have tried to find the cause of the problem themselves, and are willing to spend the time and effort to diagnose, test, and fix the problem. The developers will ignore you otherwise, because time and effort is the 'money', and they don't want to waste theirs. Now, if there is a bug to be fixed or an enhancement to be implemented, it will helpeveryone; true. But the developers are not interested ineveryone, they're interested in what they themselves use, and what their users (in the same organization, or otherwise the people paying for the developer for their time and efforts) use. Essentially, they're only concerned about the subset ofeveryonethat directly implicates themselves. Being somewhat logical –– kinda-sorta requirement for an efficient developer! –– they know thateveryoneincludesmyselfandthose who pay me, and is the impetus for doing the work.The fact thatothersineveryonebenefits, is just an ancillary reason, and is related to the secondary feature of such developer communities; the co-operativeness. Basically, because the cost of a copy is zero (but the cost of having an end-user isnegative, as they usually need some sort of support but do not contribute anything themselves), having other developers contribute is a netpositivefor each individual developer. It is a very commercial/capitalistic/individualist approach, that just happens to look like 'socialism' on the surface.(The difference betweenco-operativesand actually socialist organizations likesovkhozes orkolkhozes or even the socialistkibbutzimin Israel (1927-1991), is that the latter do not work long-term, whereas the former, working on capitalistic principles –– being anenterprise–– reducing the costs of production by sharing amongst the participants, do.)(I think I explained all this poorly, but that's only because of my not-so-good language skills, not because there is anything hazy about the stuff I'm describing. I'm just so used to it, having integrated this into my operations profile almost two decades ago, it's like breathing to me.)

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 22, 2022, 03:36:56 am
content: Quote from: SiliconWizard on May 22, 2022, 01:55:13 amPerhaps in the sense that it often requires a politically-laden discussion to explain why one might choose open source.It is not inherently a political decision: for me, it is very simply a question ofenlightened self-interest.(Thatenlightenedpart is not about some higher cause or belief, but about the fact that some choices can have wide-ranging and long-term effects, and to make properly sane and rational decisions beneficial to oneself, one must look at those wider, less easy to observe effects too.)Because of this, I'd be willing to admit that open source is aphilosophicalchoice (as it involves things like long term benefits over short term benefits; ethics over morals or legal obligations).But not an inherently political one.It only involves politics when people do not understand the commercial reasons for choosing open source, and insist on mixing politics with it.Or does 'political' include ethics and philosophy, too? I don't think so, because ethics and philosophy is personal. I've chosen mine based on what I think will work for me best, considering my personality and other features. I'd hate if they were included in governance; it'd be like enforcing by law which hand you use a fork with when eating.

author: MK14
author_rank: Super Contributor
timestamp: May 22, 2022, 04:47:27 am
content: Quote from: SiliconWizard on May 19, 2022, 05:25:29 pmThe following video (just watching a minute or so of its 5 Min 39 sec length), gives a fair bit of the gist of it. I like the way the author, explains that the Rust Language Development team, should be a "Programming development team", first and foremost, and NOT try to be something they are not, which is a political activist group.He also points out, that history seems to show, that pushing too hard for changes like that (political), can lead to a revolution. Which can cause lots and lots of deaths. Because not everyone will be happy/willing, to accept all the various changes, the revolution causes.If anyone in this thread considers themselves a programmer/developer. Then making their language choice(s), based on the primary political objectives of the programming language. May NOT result in the best and most optimal choice of programming languages.

author: Fredderic
author_rank: Regular Contributor
timestamp: May 22, 2022, 05:32:56 am
content: Have to say, when I first heard that comment about Rust being political, I assumed they meant "political" as in "polarising". I've had the sense people are kind of using the word that way a bit of late. Not so much about involving politics, but more that people feel the same way about something, as they do about their politics. Or about how people are making choices on a thing based how it "feels", rather than it's technical merits — Rust being a language with a definite "feel" to it, much like Python with it's indenting thing, I can imagine could be described as "political" in this way.I hoped that was what they meant, in any rate. The comment about helping out in the community gives me some pause, but I could imagine it more as, "help out the Rust community, so people can see it's merits beyond it's weirdness", or such.My personal take on Rust, is that I strongly disprove of large companies using their name to promote an upstart tech over existing (and in my mind better) underdogs that simply never had support from someone with such clout; Go and Rust being the prime examples. Neither, I think, bring anything particularly new or special to the tablethat would have elevated them so far so quick on their own merits, they were simply thrust there by the backing of a high-profile organisation. (Emphasis there, because Rust kind ofdoeshave something "special", I just don't think it'd have had the uptake it has, left to find it's own feet like most other languages have.)Are wecertain(I have not had the inclination to dig in to the topic, beyond the discussion here) that is not what they meant?

author: MadScientist
author_rank: Frequent Contributor
timestamp: May 22, 2022, 06:59:29 am
content: Everything is political because humans are political creatures. Computer languages are very much a political creation , often embodying the political perspectives of their creators. “Politics” of course is much more then governance or “politicians “ or what the TV calls politics

author: Nominal Animal
author_rank: Super Contributor
timestamp: May 22, 2022, 07:53:36 am
content: Quote from: MadScientist on May 22, 2022, 06:59:29 amOkay. Could you define “politics”, then? Or at least how it differs from “culture” or “social”?People keep claiming "politics" means something different than what the dictionaries say, but refuse to define it themselves.To me, that indicates they have no idea of what they are actually talking about, and are simply describing their personal feelings and beliefs.That is useless, because your feelings and beliefs do not matter. Neither do mine. What matters, are the reasons behind them; those we can discuss in an useful manner. To do that, we do need the definitions.

author: brucehoult
author_rank: Super Contributor
timestamp: May 22, 2022, 10:27:49 am
content: Quote from: Zero999 on May 21, 2022, 08:27:36 pmBeing forced by society to share the result of your labour would be socialist.Choosing for yourself what to share and what to keep private is the free market and self ownership in action.The economic right (free market, libertarian) are NOT against sharing or cooperation. They are against FORCED sharing and cooperation.

author: Karel
author_rank: Super Contributor
timestamp: May 22, 2022, 11:08:19 am
content: Quote from: brucehoult on May 22, 2022, 10:27:49 amExactly this. I shared a considerable amount of free software (free as in speech, not as in beer)because I wanted to.If somebody tells me that I should opensource also some of my closedsource software or if they tell me to use a specific license,I tell them politely to <***> themselves...

author: MK14
author_rank: Super Contributor
timestamp: May 22, 2022, 11:38:34 am
content: Quote from: MadScientist on May 22, 2022, 06:59:29 amYou are 159% right, so there is NO need for me to be sarcastic, in my reply.Next year, I'm hoping to vote for the COBOL related parties. That should keep the country running nicely!Otherwise FORTRAN, based on their websites latest political views.TL;DRYes, you can argue that EVERYTHING is related to politics. But that doesn't mean that everything should declare their political affiliations.Can I choose between 1k, 10k and 47k resistors. Or do I need to go on the respective websites for those parts, to check out their political views/declarations first?To Customer: I'm very sorry the LED lights up so dimly. I originally specified a 1k series resistor, which would have lit it up, just fine. But one of the stated political views, on the 10M Ohm resistors website caught my eye. So I designed that in, instead. Because EVERYTHING is political.

author: eugene
author_rank: Frequent Contributor
timestamp: May 22, 2022, 02:18:31 pm
content: All this fuss over something that a stranger wrote on twitter.

author: Zero999
author_rank: Super Contributor
timestamp: May 22, 2022, 07:32:14 pm
content: Quote from: MK14 on May 22, 2022, 11:38:34 amIn the UK, red LEDs are Labour, blue are Conservative, yellow are Liberal, green are obviously the Green Party, purple are UKiP, pink are anything pro-LGBT and white are a far-right white supremacist group.

author: MK14
author_rank: Super Contributor
timestamp: May 22, 2022, 07:49:00 pm
content: Quote from: Zero999 on May 22, 2022, 07:32:14 pmAlso, Flashing LEDs are the PRO People 'Flashing' in public party(did I just make that up?), UV LEDs are the Ultra-Violent party (possibly connected to Russia), Infra-red LEDS are for the rejoining with the EU party. Anti-glare LEDs, are in support of the Anti-abortion party, RGB-multi-coloured LEDs are for the multi-culture party, and the fake/faulty/poor-quality/funny-looking ones, are in support of the Chinese party.The IR-LEDs (Infra-Red) are for the Irish party, the one with a built in solar-cell, also is for the Green party. The hyper-vacuum tube type (based on the latest Valve/tube technologies), is in support of the Elon Musk (Boring Company) Party. The super micro-miniature, yet made out of soft materials one, is the Micro-Soft Party one, as is the tiny LED, with 11 tiny glass panes in it, Windows 11, Microsoft party as well.The Linear-LUX LED, or LIN-UX for short, is for the Linux party (now allowed, as programming languages are allowed to be political).

author: magic
author_rank: Super Contributor
timestamp: May 22, 2022, 07:57:04 pm
content: Of course IT is political, otherwise nobody would seriously consider Rust significant enough improvement over C to justify jumping on the bandwagon. But they are being loud enough, apparently.Consider something as simple as the C libraryqsortfunction, which takes an array of any type and a comparator function for that type and sorts it. Of course this being C, you can call the function on an array offloatwith a comparator taking arguments ofcharandintand returning a function pointer. And there is tons of other generic code like that, and bugs when somebody gets the types wrong.It's year 2022, and you still can't do it safely in an imperative language which claims to be the next generation C/C++, but you can do it in a dumbed down OO language for applications, like Java/C#.

author: brucehoult
author_rank: Super Contributor
timestamp: May 22, 2022, 11:24:38 pm
content: Quote from: magic on May 22, 2022, 07:57:04 pmThat's a bug but it's a bug that doesn't get very far before it is caught. Any reasonable unit testing is going to catch it.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 23, 2022, 02:04:15 am
content: Quote from: brucehoult on May 22, 2022, 11:24:38 pmYes, this particular kind of bug has zero chance of not getting caught unless you do no testing at all. In other cases though, problems can get more subtle.But sure, generally speaking, function pointers in C can cause all kinds of bugs, and genericity can only be achieved through either macros or function pointers, with "typeless" pointer arguments (void *), which give no possibility of compile-time checks. That's life.I think magic was kinda implying that Rust didn't do any better for generic programming than C, which I don't think is true. I don't like Rust (after having taken an honest and longish look at it), but it certainly has better support for generic programming than C.

author: Karel
author_rank: Super Contributor
timestamp: May 23, 2022, 06:23:40 am
content: Unfortunately, I find the main problem is that "a bad programmer can write bad code in any language",to paraphrase the famous saying. And most programmers are pretty bad.Good programmers avoid unsafe practices anyway, so new and better languages don't provide the advantage that was hoped for.

author: magic
author_rank: Super Contributor
timestamp: May 23, 2022, 07:26:10 am
content: Quote from: brucehoult on May 22, 2022, 11:24:38 pmSorting is a trivial example and can be tested, provided that the testing is adequate - a test that only tries to sort "2,3,1" will never catch that the comparator's type isshortinstead ofint.And we can do better. A major application of generics is containers, so considerhashmap<int>. Of course, you can store afloatin such container and it will still work just fine. The code which works with this hashmap normally will pass its unit tests and the code which incorrectly storesfloatin it also will, but the two pieces are not going to get along very well. So you will need a little higher level testing to catch it.And, of course, there is many projects that don't do unit testing at all. Including some major open source software, which the fanboys insist should be rewritten in Rust. But generics, including containers, still suck in that language like in all of its predecessors. You have a choice between C++ templates (pointless code duplication), virtual tables (individually added to each object in the container) or good old C void pointers. They call it progress.There is no reason why a modern low-level language couldn't have space-efficient containers which, for example, take an extra argument always forced to besizeof(T)to deal with different types, other than that their type systems are still universally stuck in the stone age of 1960s. Ultimately, Rust is just Mozilla's favorite subset of C++ with a syntax change so that you can't use C++ features they don't approve, plus one novel functionality of improved memory management.Quote from: SiliconWizard on May 23, 2022, 02:04:15 amHardly better than C++, though. Which is another thing they say they want to replace.

author: DiTBho
author_rank: Super Contributor
timestamp: May 23, 2022, 10:09:50 am
content: A great way to catch bugs in C is to structure the code in a way the ICE can use artificial intelligence to follow a test-case draft.Otherwise, the engineering-staff needs to be separated from the testing-stuff, they don't have to communicate at all, exceptfrom the engineering-staff: "this is the latest versioned xyz project, these are constraints, have fun"and the reply from the testing-stuff "we tested, here it is the bugs-list found, code rejected, have fun too fixing stuff"(don't forget to add figurative fingers on each step, just to emphasize that each group wants to prove that they are the best, and all problems are from the other group)to prevent the parties from affecting each otherHuman being brains are affected by bias, bias makes you blind, and needs time and rigor in order to compensateArtificial Intelligence is better here because it can test millions of things to compensate the bias.

author: brucehoult
author_rank: Super Contributor
timestamp: May 23, 2022, 11:33:33 am
content: Quote from: magic on May 23, 2022, 07:26:10 amC++ templates don't require code duplication. Even if the compiler generates multiple functions, if they have identical machine code the linker will combine them into one. If you write the C++ templates as type-safe wrappers around the same void pointers you'd use in C then the machine code will all be the same.

author: magic
author_rank: Super Contributor
timestamp: May 24, 2022, 09:28:11 am
content: Quote from: brucehoult on May 23, 2022, 11:33:33 amEven if true (I don't know) it appears to be easily defeated by the compiler inserting different NOPs for alignment or whatever stupid reason:Code:0000000000001351 <_Z5qsortIiEvPT_mPFiPKS0_S3_Em>:1351: 55 push %rbp1352: 48 89 e5 mov %rsp,%rbp1355: 48 83 ec 20 sub $0x20,%rsp1359: 48 89 7d f8 mov %rdi,-0x8(%rbp)135d: 48 89 75 f0 mov %rsi,-0x10(%rbp)1361: 48 89 55 e8 mov %rdx,-0x18(%rbp)1365: 48 89 4d e0 mov %rcx,-0x20(%rbp)1369: 48 8b 4d e8 mov -0x18(%rbp),%rcx136d: 48 8b 55 e0 mov -0x20(%rbp),%rdx1371: 48 8b 75 f0 mov -0x10(%rbp),%rsi1375: 48 8b 45 f8 mov -0x8(%rbp),%rax1379: 48 89 c7 mov %rax,%rdi137c: e8 cf fc ff ff call 1050 <qsort@plt>1381: 90 nop1382: c9 leave1383: c3 ret-- snip--00000000000013c8 <_Z5qsortIfEvPT_mPFiPKS0_S3_Em>:13c8: 55 push %rbp13c9: 48 89 e5 mov %rsp,%rbp13cc: 48 83 ec 20 sub $0x20,%rsp13d0: 48 89 7d f8 mov %rdi,-0x8(%rbp)13d4: 48 89 75 f0 mov %rsi,-0x10(%rbp)13d8: 48 89 55 e8 mov %rdx,-0x18(%rbp)13dc: 48 89 4d e0 mov %rcx,-0x20(%rbp)13e0: 48 8b 4d e8 mov -0x18(%rbp),%rcx13e4: 48 8b 55 e0 mov -0x20(%rbp),%rdx13e8: 48 8b 75 f0 mov -0x10(%rbp),%rsi13ec: 48 8b 45 f8 mov -0x8(%rbp),%rax13f0: 48 89 c7 mov %rax,%rdi13f3: e8 58 fc ff ff call 1050 <qsort@plt>13f8: 90 nop13f9: c9 leave13fa: c3 ret13fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)And there is obvious objection that you are relying on optimizations that aren't in any way standardized nor guaranteed and will depend on choice of toolchain, optimization/debug level and phase of the moon.Besides, I don't like wrappers. Instead of all this crapCode:template <class T>void qsort(T *ptr, size_t n, int (*cmp)(const T*, const T*), size_t sz = sizeof(T)) {std::qsort((void*) ptr, n, sz, (int(*)(const void*, const void*)) cmp);}I want to writeCode:generic <class T>void qsort(T *ptr, size_t n, int (*cmp)(const T*, const T*), size_t sz = sizeof(T)) {// honestly type-checked implementation of qsort goes here// any use of sizeof(T) or T[] transparently employs sz// sz can't be overriden manually at the call site// exactly one instance of the function generated in this translation unit and none elsewhere}Bonus if somebody can figure out how to do type-safe intrusive containers (which are all over the place in Linux, for example).

author: rsjsouza
author_rank: Super Contributor
timestamp: May 24, 2022, 10:30:31 am
content: Quote from: magic on May 24, 2022, 09:28:11 amDepending on the ISA, NOPs are placed to flush the pipeline before taking a long branch. Obviously that, if thenon-templatedcode does not have them, indeed it is an implementation problem.

author: brucehoult
author_rank: Super Contributor
timestamp: May 24, 2022, 11:17:39 am
content: I don't know why you got different code, but then I also don't know why you used -O0, which should be banned not the default.With -O1 I got exactly the same code.https://godbolt.org/z/da66KT8dxAlso, with such a simple type-safe wrapper template I would normally not prevent the inlining of it.

author: magic
author_rank: Super Contributor
timestamp: May 24, 2022, 02:30:38 pm
content: I can only guess it was a matter of alignment, which could depend on what stuff precedes and succeeds each of the instantiations. Also, one of them was at the end of a section, so maybe it matters somehow. I posted unoptimized code because otherwise everything got inlined and I didn't feel like writing a longer template that wouldn't.Anyway, it nicely illustrates the point that you can't be 100% sure what you get because it's an optimization. A more reliable (and efficient) way is to have a language mechanism which avoids generating duplicate code in the first place.ML had parametric polymorphism in the '70s, Java since the '90s (generic containers andsortingincluded), Rust designers still haven't heard of it in the 2010sBTW, speaking of Rust, is it even possible to write a similar wrapper for stdlib's qsort by any means whatsoever in that language?In C++ I had to resort to function templates and default arguments, not sure if Rust has those...

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 24, 2022, 06:12:02 pm
content: Why would you want to write a wrapper for the C lib qsort() if you're gonna write a generic sort function in another language?Sorting is not rocket science.

author: magic
author_rank: Super Contributor
timestamp: May 25, 2022, 07:47:16 am
content: It doesn't matter. Regardless of implementation language, a generic array sort needs to know element size. So do many containers and other things.Question is, can it be provided by the compiler automatically each time such a generic function is called.C++ can do it, with a footgun included (one comma too much and it breaks in most bizarre ways).Java sidesteps the problem by not having nested objects - containers only hold pointers to heap items.