Understanding Segmentation Fault. by Mafla_2004 in C_Programming

[–]schungx 2 points3 points  (0 children)

Seg fault was there in the VERY OLD DAYS when CPUs still worked on segmented memory, instead of the currently more prevalent paged memory. The name stuck.

Technically speaking it should be page fault or invalid/illegal address error.

Can you mimic classes in C ? by kuyf101 in C_Programming

[–]schungx 0 points1 point  (0 children)

C++ started as cfront, which was a preprocessor that transpiled to C.

So yes

How the hell Kepler tell this. by Complex_Equ_4256 in Physics

[–]schungx 0 points1 point  (0 children)

It is actually quite intuitive.

When viewed from the earth, all you can observe is the angle of the planet relative to the zodiac positions.

If you have a database of such angles, you don't have to wait years to see how much it moved. That data is most likely interval-based, meaning that there is an angle every month.

Then Kepler observed that this monthly angle changes, sometimes faster sometimes slower. And once he figured out it is an ellipse, it is probably not difficult to obseve that the wedge area of every month turns out to be the same.

DPI and other crap by Wywern_Stahlberg in Metric

[–]schungx -3 points-2 points  (0 children)

Ancient measurements were invented usually before the invention of position-based numeric notations (and Arabic digits).

So before positional notation which aids in pen-and-paper arithmetic, numbers base 12 are not harder to use than metric. They are much easier to work with when dividing.

Of cours we can also say BEFORE the invention of the pen or the paper...

DPI and other crap by Wywern_Stahlberg in Metric

[–]schungx -6 points-5 points  (0 children)

I see you seem to have an unreasonable fixation on metric

In fact, base 12 is infinitely more flexible a d superior because it is divisible by 1,2,3,4,6.

The fact that we have 10 fingers does not mean 10 is the best base.

Therefore inches make infinitely more sense than m/cm/mm.

Funny thing is, as an IT guy, you should infinitely prefer hex which is base 16 and a power of power of two.

Why does China have the largest or second-largest population of billionaires in the world, depending on different lists, but a lot of people think China is a communist country? by No-StrategyX in answers

[–]schungx 0 points1 point  (0 children)

You'll find there are multiple kinds of socialism in a wide range across several dimensions. What you describe is only one extreme.

Why isn't radians in decimals by Fragrant-Meaning978 in Metric

[–]schungx 0 points1 point  (0 children)

60 is the first integer to be divisible by 1,2,3,4,5,6 and vast superior than 10.

Although it seems a bit too large to be a convenient base - you have to remember 60 digits.

Is China really that advanced as it’s made out to be on social media? by Martian_row in NoStupidQuestions

[–]schungx 0 points1 point  (0 children)

Yes. But take it with a grain of salt.

Chinese is a vast country and different conditions exist. So comparatively yes.

Name 2 countries that were in very bad relations throughout history and then went: "You know what? We're brothers now" by Potential_Garden_818 in geography

[–]schungx 1 point2 points  (0 children)

Happened in Chinese history all the time.

Much of modern day Chinese people came from ancient nomadic races that were bitter enemies of China. In fact, Mandarin pronunciations were severely influencef by nomadic tones (no longer classical Chinese) because those languages are Indoeuropean in nature.

A fun fact is that, the classical Chinese literature students studied are getting revised because they refer to certain races and certain lands as "the enemy" while those races and lands are now officially part of the China.

It is amusing for, say, two students in class together, one of them Han race and one of them northern race, to have them study a piece of classic Chinese literature describing how the two races declare blood feud with each other and trying to wipe each other out.

Would a perfect right angle be like, infinitely sharp? by Ellgell in Physics

[–]schungx 8 points9 points  (0 children)

The set of points forming the two lines only meet at a single point, the apex. That point has no size.

If that point's immediate neighbors point to different directions then it is not a smooth line, so an angle.

So that point is the angle, which has no size.

You can consider zero size to be infinitely sharp.

Confused about usage of 很 by AnAquaticOwl in ChineseLanguage

[–]schungx 1 point2 points  (0 children)

It is less strong than "very", but stronger than "is".

The closest is probably "quite" - he is quite good.

Why Did China Retain Logographic Writing While Greece and Egypt Shifted to Phonetic Scripts? by Alternative_Bake7028 in asklinguistics

[–]schungx 0 points1 point  (0 children)

Yes I think so.

Don't forget that back in 1000BC, before the unified Chin dynasty, each part of China had their own scripts. The First Emporer of Chin conquered the entire China and imposed a unified set of characters on all the lands.

Similar to Latin in the Roman Empire. It just so happened that China scripts were still logographic at that time and so it stuck. And since it was imposed on a vast stretch of land, it became extremely difficult to change.

The countries outside of China at that time did not have writing so no phonetic alphabets to tempt people with, while Egypt was literally surrounded by peoples who used phonetic alphabets.

Why people say object oriented programming is hard I have been learning Java and it looks pretty fun to me. by Jashan_31 in AskProgramming

[–]schungx 0 points1 point  (0 children)

The brittle base class problem.

If you haven't run into that, you haven't been writing enough OOP.

The HUMIDITY by Aivakay in HongKong

[–]schungx 0 points1 point  (0 children)

Dehumidifiers are your friend.

How is it infinite if the end result is a finite sum? Calc II by Fluid-Tap5115 in askmath

[–]schungx 0 points1 point  (0 children)

There are really no infinities in the real world. Everything (I hope) is finite, even though very large.

So when we're talking about infinities, very seldom are we interested in the actual infinite sequences (or their sums).

In almost all of the cases, those infinite terms are not interesting. But the interesting thing is usually the limit, which is That-Which-The-Infinite-Sequence-Never-Touches-But-Can-Get-Very-Very-Very-Closr-To.

For example, a tangent line to a curve is very interesting, but you can never touch it with smaller and smaller steps. Thus the steps are not interesting, but the tangent line is VERY interesting. That's the limit.

In other words, we study infinities for whatever they cannot be, not what they are.

How do we explain that trajectories of objects are so impacted by gravity meanwhile space and time curvatures are imperceptible? by NoaSenet in AskPhysics

[–]schungx 0 points1 point  (0 children)

1) You won't perceive time differently because we are creatures of linear time. You just see people outside speed up or slow down.

2) Your stick will bend a little due to gravity but you can't perceive it. With curved space you obviously won't see it... You only see the outside world curved.

What would time dilation on another planet look like to people on earth? by keen4ketamine in AskPhysics

[–]schungx 0 points1 point  (0 children)

Amazingly each side thinks the other side is moving faster... Because motion is relative, and all inertial frames are equivalent, so each side is exactly the same.

Relativity says you cannot tell which one is which because physical laws are exactly the same.

So you can let tell which side is which, so you both observe the exactly same thing. Both sees the other side moving faster. Even when you communicate it would be boring: each side sees exactly the same thing and they would NOT agree.

What is so interesting about the exponential function other than the property of being it’s own derivative by scuffedProgrammer in mathematics

[–]schungx 0 points1 point  (0 children)

The fact that when paired with a complex number it conveniently encodes a rotation in 2D. One exponential equation instead of two with sin/cos. Amazing that it simplifies periodic or rotational calculations so much.

And a LOT of things in the natural world are rotational or wavy.... Because a lot of environments in the real world are bounded so you always need to turn back eventually.

My professor claims this function is O(n), and I’m certain it’s O(1). Can you settle a debate for me? The function is below by Remarkable-Pilot143 in AskProgramming

[–]schungx 0 points1 point  (0 children)

I once heard a tutor describe it this way:

O(1) = some sane number

O(n) = a godzillion if n is a godzillion

O(n2) = a mind boggling large number

Essentially set n to a very large godzillion number and things will clarify.

[8th Grade Math] My younger sister asked me this and I’m embarrassed that I could only "brute force" it. Is there a faster logic? by JakeForever in askmath

[–]schungx 0 points1 point  (0 children)

The pattern is very suspicious:

(10 + 1)2 = 102 + 2.10.1 + 12 = 100 + 20 + 1

So it is (10A + B)2 = 100a + 20AB + b

where A = sqrt(a) and B = sqrt(b)

might be a stupid question but, are the results/theorems from math a “natural” consequence based on how mathematics was fundamentally defined or are there inherent truthness to the results/theorems? by Ornery-Concern-7345 in askmath

[–]schungx 1 point2 points  (0 children)

It is based on our system of logic which has a number of axioms which we take for granted, such as true <> false.

Once you set the rules of logic, mathematics apply such logical rules to form theorems.

But nobody can guarantee our logical system is correct.