Every open interval $(a,b)\subseteq \mathbb R$ is indeed homeomorphic to $\mathbb R$. The one-point compactification of $\mathbb R$ is homeomorphic to the unit circle $\mathcal S^1$.
Now, $\mathbb R$ and $\mathcal S^1$ are not homeomorphic because the latter is compact (and the real line isn't). Is that what you mean by "compact circumference"?
The two-point compactification of $\mathbb R$ is homeomorphic to the closed interval $[0,1]$ (or any other closed real interval).
So it looks like you got it right.
[Also, here's a post where you can find a definition of the two-point compactification and also an interesting discussion: Question on compactification ]
Well, the point being talked about is called denseness/density and it applies to rational numbers also. The case of rational numbers is simpler and ideally should be in the mind of a seventh grader. It is rather unfortunate that most textbooks don't emphasize this concept of density at the right time and later on students have to struggle while studying calculus.
We start with the following:
Theorem 1: Between any two (distinct) rational numbers lies another rational number.
This is an immediate consequence of the following:
Theorem 2: Given any positive rational number there is another smaller positive rational number.
This is easy to understand and prove as well. If $m/n$ is a positive rational number then $m/(n+1)$ is a positive and smaller rational number. So the whole thing is ultimately dependent on the existence of a larger positive integer $n+1$ given a positive integer $n$. Moreover this also shows that there is no least positive rational number.
Next we can use theorem 2 to prove theorem 1. If $a, b$ are two rationals with $a<b$ then the number $d=b-a>0$ and we just need to find a smaller positive rational number $d'$ (which exists via theorem 2) and we can take $c=a+d'$ as our rational number lying between $a, b$.
Both the theorems above can also be proved using midpoint technique. Thus if $d$ is a positive rational number $d/2$ is a smaller one. And clearly $(a+b) /2$ is a number which lies between $a, b$. It is important to note both the approaches towards these theorems. Note also that the result in theorem 1 can be repeated to get as many rational numbers as we please between any two given rationals.
Now the idea of a neighbor (successor or predecessor for the case of integers) breaks down for rational numbers. To put it more precisely given any rational number $r$, there is no least rational number which exceeds $r$ and there is no greatest rational number which is exceeded by $r$.
This is expressed informally by saying that given any rational number $r$ we can find a rational number as close (near) to $r$ and less (or greater) than $r$ as we please.
The definitions of key concepts (limits) in calculus use the ideas mentioned above and are crucially dependent on the fact that there is no least positive number and there is no largest positive integer. However the fact that there is no next neighbor for a given rational number is not a drawback. It's a feature which is used everywhere in the definitions in calculus. A consequence of these facts is that we have an infinite supply of smaller and smaller positive numbers and greater and greater positive integers. And calculus in general deals with and therefore needs such infinite things.
Another key and slightly difficult ingredient in calculus is what we call completeness and that deals with the fact that although rationals are dense, they do lack something and this inadequacy is fulfilled by creating real numbers. The idea of completeness is not given sufficient focus in most textbooks of calculus (like in this answer too, but that's only to keep the length of the answer in control and can be discussed in another answer if you wish) but one can summarize the picture as follows:
The idea of denseness is essential to formulate the concepts of calculus and the idea of completeness is necessary so that these concepts don't operate in a vacuum (ie they do have some non-trivial consequences).
Best Answer
This is the definition provided on Wikipedia.
This means that the function $f$ is called a function of a real variable if and only if $f:D\to E$ for some set $E$ (common examples are the real numbers $\mathbb R$ or the complex numbers $\mathbb C$), where the domain $D$ is a subset of $\mathbb R$ and in addition, $D$ has a subset $(a,b)\subseteq D$ so that $b>a$. Here, the "length" of an interval of the forms $(a,b),[a,b],[a,b),(a,b]$ are all defined to be $b-a$. So by "positive length" we mean that the length $(b-a)>0$, i.e. $b>a$. The reason we need to make this definition is because usually, we consider sets of the form $[a,a]=\{ a\}$ as intervals too. But of course, this set has zero length.
In your example, the domain $D=\{1,2\}\cup[3,4]$ does satisfy this criterion, because the interval $[3,4]\subset D$ is an interval of positive length (in particcular, it has length $1>0$). On the other hand, sets like the rational numbers $\mathbb Q$ but also more "pathological" sets like the Cantor set can be shown to contain no intervals of positive length, and will not therefore suffice as an example of the domain of a real variable, as it is defined on Wikipedia. The formal definition of this is in terms of measures, specifically the Lebesgue measure, which formalises the idea of lengths. The Lebesgue measure of the Cantor set is $0$ [see here], so that it does not contain an interval of positive length.
The reason we often impose the restriction that $D$ has an interval of positive length is because we often want to study changes in $f$ around the neighbourhood of a particular point $x$ in the domain. We want to ask questions you might have seen in Calculus, such as "if we change $x$ by a little bit, how much does $f(x)$ change?". We can do so if there is a connected set (i.e. an interval) to deal with. But if our set looks like $D=\mathbb Q$ for example, it makes our life harder. So we exclude those sets from definition just so that we don't need to think about them.