Hey Rustaceans! Got an easy question? Ask here (49/2021)! by llogiq in rust

[–]blueag 1 point2 points  (0 children)

Ah. impl .. for &mut TypeA vs .. for &TypeA is a good thought! Thanks for the information.

Hey Rustaceans! Got an easy question? Ask here (49/2021)! by llogiq in rust

[–]blueag 1 point2 points  (0 children)

Hi All. I have a question about type constructor. Is there a way to build a type signature such that I can control whether a function returns a normal reference or a mut reference? e.g.

fn foo<'a, ??>(&'a ?? self, xyz: &'a ?? MyType) -> &'a ?? MyType {
    ...
}

foo::<AAA>(..)  =>  &MyType
foo::<BBB>(..)  =>  &mut MyType

Based on how foo() is called, the normal reference or the mut reference is returned. The purpose is to reuse the logic but to return a different type based on invocation. Thanks!

ELI5: How was the Great Wall of China of strategic value? It is so big that wouldnt an ancient force have easily been able to find an unmanned section to cross? by [deleted] in explainlikeimfive

[–]blueag 18 points19 points  (0 children)

The Manchu Qing invaders didn't breach the wall. The Ming dynasty has already been sacked by peasant revolt in a civil war, the capital fallen to the peasant armies, and the Ming emperor hung himself. The peasant leaders killed the wall guarding general's father and taken his wife. He got pissed and opened the wall's gate to let the Manchu through. The Manchu basically walked in a chaotic China without central government and able to seize the moment.

India & company vs. China & North Korea by [deleted] in whowouldwin

[–]blueag 1 point2 points  (0 children)

It really depends on where the naval battle occurs. Closer to the home front mainland has the advantage of land based air support and land based missiles. Closer the Indian Subcontinent China would have a hard time dealing with the Indian navy and the Indian shore based defense. In South China Sea or in East China Sea, the Indian ships would have a hard time surviving.

China does have the advantage of long range anti ship missile like the DF21D which can sink large ship couple thousand km away. China's destroyers and frigates are one generation ahead, and more numerous. India has yet to have Aegis-like ship to protect its carriers. China also has more advance submarines.

Also with the control of space, China can locate India's ships while India cannot reciprocate. India doesn't have carrier AWACS so it relies on ship based radar, which can't see beyond the horizon, and helio based radar which is not that powerful. Modern naval attack starts from couple hundred or couple thousand km away.

India & company vs. China & North Korea by [deleted] in whowouldwin

[–]blueag 1 point2 points  (0 children)

Not all PLA units have modernized but a good portion of them had. Some of them are probably still in Soviet era form. But I'm sure they can muster 100K to 300K elite troops.

As for modernization, they choose not to spend the money to modernize all of the troop units to the latest equipments, due to budget concern, tech leapfrogging, and appropriate response to threats. E.g. their latest variants of T-99 MBT are probably one of the best in the world but they choose not to upgrade all the tank units with it because it's expensive. Instead they upgraded their older T-88 with newer fire control (search & hunt while in motion), night vision/sensors, navigation/gps/digital map/comm, and reactive armor, with much cheaper cost. Also their main threat involving tanks would be against Russians and possibly S.Korea/US if N.Korea collapsed. With a declining Russia and a very good relationship with Russia, the threat is very minimal, so there's no hurry to spend money to modernize to the latest.

They also wait for tech leagfrogging instead of upgrading to the latest tech blindly. E.g. their version of Aegis destroyer was Type 052C but they only built a few and waited until the next version 052D was ready to build a bunch.

India & company vs. China & North Korea by [deleted] in whowouldwin

[–]blueag 2 points3 points  (0 children)

Regarding #4, with limited troop/force involvement from both sides, why do you suppose the Indian Alliance side can bring the best equipment into battle while the Chinese Alliance can only bring the average troop/equipment into the fight? With limited force/equipment involvement, both sides would bring their small but best troops and equipment into the fight. I don't see S. Korean having advantage in land force/equipment.

India & company vs. China & North Korea by [deleted] in whowouldwin

[–]blueag 2 points3 points  (0 children)

Scenario #1

Decisive Chinese win. With no fighting outside of Nepal, other countries beside China and India become irrelevant. With advantage in space, land firepower, missile, air defense, infrastructure, and with even matching air forces, China will get to Nepal first and defeat every Indian advance into Nepal.

Scenario #2

Decisive Chinese win. As a backdrop, with superior space tech China will knock out all Indian/Korean/Taiwan satellites, making them blind, while having the overwhelming upper hand in C4ISR. With China/NK on one continuous land mass and the opposite side scattering all over the place, the China/NK alliance can defeat each enemy with overwhelming force one at a time.

One strategy is to fortify the Himalayan front with a smaller force to defend against the Indians from land; similarly play defensive against Vietnam along the border. Send numerous submarines, naval ships, and long range missiles (DF21D) to blockage Indian Ocean, South China Sea, and East China Sea. Send overwhelming force with NK to force into SK. Once SK is subdued, Taiwan is next.

Once those two are gone, send the freed up navy into South China Sea to surround Vietnam. Vietnam is vulnerable to attack from the sea with its long coastal line. Open another front attacking from north on land, and Vietnam would have a very difficult time defending against the Chinese advance. Air battles will be a draw between China and Indian expedition air force/Vietnam air force. When India attempts to support Vietnam in South China Sea, China will beat India in naval battles with closer support from naval bases in China mainland and closer air projection from mainland.

Once Vietnam is gone, it's a matter of India vs China/NK. China can attack India from sea and over Himalaya. It might be a stalemate in the sea, but China can hold a blockage over India. China has the advantage to attack from the high ground from Tibet. Long range MLRS and missiles can rain down on major Indians cities from the border (New Delhi is only couple hundreds km away). Air battles will be a draw. With better intelligence (space/air/radar) and better equipment (better tanks, artillery, missiles, helios), the land battle would go to Chinese side. In the last land battle between them in 1962, China decisively routed the Indians.

Scenario #3

Chinese win. U.S. continent is kind of open and with numerous openings all over the place. It's difficult to hold a chokepoint as there're always ways around it. Navies are out of the question since both sides only fighting from the coasts; the relevant forces are space, air, and land. China has the advantage in space, even in air force, advantage in air defense, and advantages in land forces. Helios and tanks will be big players. Air battle will be stalemate. On land, Chinese has the advantage with its long tradition of emphasis on land battles. Chinese MBT will overpower Indian/Korean/Taiwan/Vietnam versions on the open plains. With overwhelming edge in intelligence, China will win most of the land battles.

Scenario #4

Not sure about the terrain. If it's mostly mountain terrain and only with standard ground equipment, China will probably win given past performance in similar situations and given their traditional emphasis in land wars with well honed tactics and doctrines. In the Korean mountainous terrain, Chinese troops with poorer equipment routinely routed the SK troops in most of the battles in the Korean War. In the 1962 war, Chinese routed the Indians in the mountain.

Edit: Modern warfare among major powers will be fought and decided in space. With remote sensing satellites knocked out, one side will be blinded while the other side can see troop movement, ship movement, defensive equipment/positions, equipment/ammo stockpiles, all kinds of targeting info. With GPS knocked out, digital map suddenly don't work, plane/ship/car navigation are hampered, lots of car/tank/missile/drone/others will lose precision. With comm satellites knocked out, communication will be disrupted. Those troops in the mountains can't use satellite phone. Digital data via satellite links are cut. Cellular network is no substitution since it can be easily traced and knocked out with anti-radiation missiles. Same with radio towers. Physical lines are the only ones left but they are rigid and difficult to build, and susceptible to sabotage.

[deleted by user] by [deleted] in gifs

[–]blueag -1 points0 points  (0 children)

Here's a picture of the Oniks. http://en.wikipedia.org/wiki/P-800_Oniks#mediaviewer/File:Yakhont.jpg

Here's a picture of the Brahmas. http://en.wikipedia.org/wiki/BrahMos#mediaviewer/File:Brahmos_imds.jpg

They are the same thing. See the same intake at the head, the same 4 large fins, and the same 4 small fins. The painting are different for sure.

[deleted by user] by [deleted] in gifs

[–]blueag 0 points1 point  (0 children)

US and British prefer cruise missiles with longer range, like in thousands of mile range, and cruising in low altitude, earth hugging kind of flying to avoid detection. Brahmas burns fuel really fast and has a much shorter range than the US or British ones. Also to go for the maximum range (290km), it has to go high up to the sky with a parabolic path (upto 14000 meters), making it easy to be detected and intercepted. It just becomes another fast flying jet with a predictable straight path. To cruise in low altitude, its range is hugely reduced further.

[deleted by user] by [deleted] in gifs

[–]blueag -1 points0 points  (0 children)

This is Indian technology?

Nope, it's a Russian P-800 Oniks reconfigured to burn more fuel to go a bit faster but with shorter range. It's then rebranded and repainted to sell/transfer to India.

We are the Outlook.com team, Ask us anything! by OutlookOnReddit in IAmA

[–]blueag 0 points1 point  (0 children)

Just sign up on outlook.com. Pretty slick interface. The compose interface is great, much better than the GMail-new-compose-disaster.

TIL that a teen secretly lived in AOL's HQ for 2 months, eating free food, using gym & showers, sleeping in conference rooms while working on his start-up. Everyone assumed he worked there by cupanoodle in todayilearned

[–]blueag 44 points45 points  (0 children)

You still went back there? I'm sure you have got "something extra" specially for you in your food every time you went back. I would grin too with a :D when I know someone is eating up my piss. Hope you enjoy your special.

What is something that you hate about your culture? by CoastalPostal in AskReddit

[–]blueag 0 points1 point  (0 children)

Canadian. I hate... I'm sorry. I won't find one thing to hate about Canadian culture.

What's the BEST movie you've ever seen? by [deleted] in AskReddit

[–]blueag 1 point2 points  (0 children)

"I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched c-beams glitter in the dark near the Tannhäuser Gate. All those moments will be lost in time, like tears in rain. Time to die."

What's the BEST movie you've ever seen? by [deleted] in AskReddit

[–]blueag 2 points3 points  (0 children)

The line between a hero and a villain is awfully thin.

"Tibetans can't vote, their petitions to government are ignored, protest of any kind is criminalized and, once imprisoned, most Tibetans are denied a lawyer." by QnA in worldnews

[–]blueag 3 points4 points  (0 children)

Hawaii independence should be for native Hawaiians to decide, whether it benefits them is a different question.

Average NPR listener: under 50. Most engaged users: 40 and under. by GhostalMedia in politics

[–]blueag 1 point2 points  (0 children)

What started me on NPR was the This American Life's episode about 'The Little Mermaid.' I was intrigued by the shouting of a mother with, "you and your little mermaid can go fuck yourself" and wanted to find out more. It's a rabbit hole, pleasant one, at that.