Home
Bartosz Milewski
29 January 2004 @ 09:24 am
I started thinking about the next computer language after C++. There are good things and bad things about C++. I wonder if it's possible to keep the good things and get rid of the bad things. Worth keeping is the expressive power of C++. Practically all the rest should be changed, syntax in particular. We can learn from the mistakes made in C++ as well as from the direction in which it is evolving.

This is just a record of my current thoughts.

1. Terseness is overrated if not harmful. Terseness is the legacy of C and has been slowly abandoned in the evolution of C++. Compare for instance the length of C keywords: int, char, long, etc., with the length of new C++ keywords: template, namespace, typename, etc. This is also true about the elision or complete absence of certain keywords--in KR C you could elide 'int', or the arguments to a function declaration. There is no 'define' keyword to distinguish definitions from forward declarations and usage. Note that the newer keyword 'template' distinguishes between definition/declaration and usage.

2. Symbol overloading is harmful. There are very few ASCII punctuation/sybmol characters and they are heavily overloaded in C++. Examples: *, &, >, etc.

3. Naming is limited to alphanumeric ASCII charaters. That is not even good enough for English speakers, not to mention others. A Boolean variable, for instance, would gain clarity if it could involve a question mark, and an exclamation could distinguish between verbs and nouns. Examples:
bool empty? ();
as opposed to
void empty! ();
or
int count () const { return _count; }
as opposed to
int count! (); // do the counting

4. Comments are limited to text. In many cases, including a picture would be much more useful. A full HTML comment would be even better.

5. Splitting code into files is not well integrated with the language. This is the legacy of UNIX. A more general database structure might be more appropriate.

6. C declaration syntax is counterintuitive. Pascal-like syntax, which is inverted C syntax, is easier to read.

7. Defining int to have compiler-dependent size leads to more trouble than it's worth.

Here are a few proposals addressing the above problems:

1. Use Unicode throughout. In particular, take advantage of the richness of symbols in Unicode. Symbols could still be input using a regular keyboard, but they would be immediately converted to Unicode. For instance the combination -> would turn into a single arrow. Similarly <-, turned into a left arrow could be used for assignments. Equality could then be expressed using a single = sign. Less-or-equal and greater-or-equal signs would also be single Unicode characters.

2. Introduce the 'define' keyword. Templates would be expressed as 'define' with arguments. Let's say:
define (X: type)
class A: public X {};
This way there would be no need for angle brackets and the related ambiguities.

3. Pascal-like declaration syntax
For instance:

define func (x: int4, y: complex8): complex8 {}

4. Sizes of integers and some other basic types would be specified in bytes. int4 is a 4-byte integer. float8 is an 8-byte float, complex8 is a complex number using float8.
 
 
Bartosz Milewski
09 November 2003 @ 06:07 pm
Astrology is very old. It goes back to the period in our history when humans decided to grow plants for food. In agriculture timing is everything. Plant the seeds too early and the crop will be killed by frost. Plant them too late, and it will be scorched by the sun during hot months.

In order to take full advantage of the new revolutionary food-growing technology, humans had to solve the problem of measuring very long periods of time with reasonable accuracy. They turned to stars. Thus was conceived astronomy.

Astrology was the next natural development. It was the first unified theory. It unified the laws that drive the fate of a plant with those that rule the fate of a human. Notice that astronomy was not even a theory, it was just a database of observations. Astrology, on the other hand, was the opposite--it was a theory with no basis in observation.

Over the next tens of thousands of years both astronomy and astrology underwent various refinements. Modern astronomy can not only predict the seasons of the year, but explain the movement of stars and planets, the forces that drive them, the evolution of stars and galaxies, and even estimate the age of the Universe.

Astrology, like many other attempts at grand unification, turned out to be a failure. Unfortunately, as far as explaining human fate, we still don't have a better theory. So there we are...

By the way, being a Sagittarius, I can't take astrology seriously. Sorry, all you fishes, rams, and virgins.
 
 
Bartosz Milewski
18 May 2003 @ 06:30 pm
Cho  
[info]bartosz posted an interestng review of Margaret Cho's performance last night at the Benaroya.
 
 
Bartosz Milewski
17 May 2003 @ 01:24 pm
In the new universe I am [info]bartosz. I already moved all the non-cosmology related posts to that new universe. The new universe is quickly expanding (the inflationary phase at full swing). I will continue posting cosmological, quantum, gravitational, metamathematical, etc., stuff here. All the rest of my brain has been shipped in cryogenic boxes to [info]bartosz. I also moved my friends to that new account, so I'm gonna purge you guys from here--no hard feelings, I hope. I'll be watching over you from that other place. What... are... you... doing, ... Dave?...

By the way, I also joined the friendster. With just two friends, [info]seattlesque and [info]starfish77, I was immediately connected to more than 4000 people. That's more than I thought was the population of the Earth, but I've always been bad with numbers. These two friends must be some kind of power friendsters! With friendsters like these, I might as well be a wheelchair-bound hawking and don't give a shit.
 
 
Bartosz Milewski
12 April 2003 @ 07:26 pm
During the Planck era the expansion was much faster than the speed of light. This is why various regions of the Universe (tinier than the Planck length) couldn't communicate with each other. They would send signals to each other with the speed of light, but they were receding from each other faster than that.

There were minuscule regions, which could not exchange energy or information, therefore they couldn't reach any kind of equilibrium. If one of them was hotter than the other, or denser than the other, they would remain so for a long time. And we believe that the early Universe was not uniform, so there was plenty of variation in energy and density.

If the early Universe were perfectly uniform, it would stay this way forever, and we know it didn't--we see the clumps called galaxies, stars, planets, and so on. We also see low level fluctuations in the microwave background (of which more later), which prove that the Universe was not uniform even when it was only a few hundred thousand years old.

Fine, so it wasn't perfectly uniform. We can blame quantum fluctuations for the lack of uniformity. Indeed, we see fluctuations in short scales: they gave rise to galaxies, clusters of galaxies, superclusters, filaments, sheets, and voids--up to about 100 megaparsecs in size (a parsec is about 3.26 light years). We are talking about regions of 300 million light years. The astronomers have looked much furthere than that--last I've heard it was 2500 million light years (2.5 bln ly). And guess what, they haven't detected any larger-scale structures. The Universe seems to be pretty uniform on the scales larger than hundreds of millions of light years. This is also corroborated by the observations of the background radiation.

You might compare the structure of the Universe to that of a piece of pumice stone. On small scales it is bubbly, but on large scales it looks like more-or less uniform solid. Why is pumice uniform? Because different parts of it had the same temperature when it was congealing. Why did they have the same temperature? Because they had time to reach thermal equilibrium--the heat had time to spread.

Now, think about this--the background radiation has been roaming the Universe virtually unempeded for more than 13bln years. When we detect a photon of the background radiation, we know that it was emitted 13bln years ago and it's been following a straight line (or slightly curved due to the curvature of the Universe) from its point of origin to the microwave antenna of our detector. It has never been scattered or reflected, because the Universe is amazingly transparent. This is the first photon that was able to reach our corner of the Universe from that particular region.

At the same time, another microwave antenna is catching a photon coming from the opposite direction. This also is the first photon from another region of the Universe opposite the first region. There hasn't been a single photon before now from any of these regions to reach farther than the Earth. In particular thare has been not a single photon from one region to reach the other region--one region is outside of the (ever expanding) horizon of the other region.

This is called the horizon problem.
 
 
Bartosz Milewski
15 March 2003 @ 01:46 pm
Imagine two anthills in space (regions of Cosmos), trying to send food to each other through courrier ants (photons). Suppose that one anthill has much less food than the other. But since they are able to exchange food, their stores will eventually equilize. The ants have to crawl along a rubber strings (straight lines in space) connecting the anthills.

In the beginning the two anthills are flying away from each other much faster than the speed of their courriers (the Planck era). So as the courrier ants keep walking the rubber string, the string is stretching faster than they walk. But since the rubber tension (gravity) slows down the velocity of the anthills, the courriers start gaining distance. At some point the first courriers reach the middle of the string (the Earth) and are registered by us. They will, however, have to continue their journey for a very long time before the first care package from one anthill arrives at the other.

What we should observe is that the courriers from the poorer anthill are carrying much less food that the courriers from the richer anthill. But to our surprise, we see that all the curriers that are coming to us from all possible directions are carrying almost identical packages of food. Did they all start with equal stores of food?

No, they didn't! We can also intercept courrier ants that have originated from anthills that are very close to each other. They had plenty of time to exchange food and yet they don't carry identical packages. The variation of package sizes coming from neighboring anthills is virtually the same as among the ones coming from oposite sides of the ant universe. Something is wrong!

The constantly expanding reach of courrier ants coming from a particular anthill is called its "horizon." Why are the resources of one anthill that's outside of the horizon of another anthill so similar?
 
 
Bartosz Milewski
11 March 2003 @ 07:08 pm
This is where the speculations are getting a tiny bit more plausible. At about 10-43s (Planck unit of time) it is postulated that gravity became separated from all other interactions. What does it mean? That before that time, all interactions were completely indistinguishable. There was no difference between gravity, electromagnetism, strong interactions, and weak interactions. Physics was extremely simple--totally symmetric--too bad we have no idea how it worked.

It is also possible that the Universe had more dimensions that the currently observed 3+1 (three dimensions of space and one dimension of time). If so, the spare dimensions underwent the so-called compactification--they curled into very small circles. It is also possible that the Universe was supersymmetric--there was no difference between Bosons and Fermions. (Present-time examples: photons are Bosons, electrons are Fermions, and they have hardly anything in common.) Even better, the Universe could have been ruled by strings, or their generalizations, branes. Their physics was described by the esoteric M-theory. Or not!

At the end of the Planck era all the beautiful symmetry of interactions presumably started breaking up. Gravity broke off first. As it got weaker, its quantum nature became less pronounced. From then on one could safely start describing gravity using the good old Einstain theory of General Relativity. The rest of the interactions were still weirdly symmetric.

If one believes in supersymmetry, it had to be broken next. Fermions were separated from Bosons. Fermions became what we now call "matter" and Bosons became "interactions" (or forces, or radiation). Because of tremendous density, the Universe was initially dominated by radiation. Fermions would pop out of this radiation soup for a moment and then quickly annihilate, turning back into radiation.

And then, at about 10-35s after the Big Bang, in yet another symmetry breaking, the strong (or nuclear) interactions were separated from the rest. The quarks were born. And the whole Universe went really crazy...
 
 
Bartosz Milewski
08 March 2003 @ 11:03 am
The first 10-43 seconds (0.0000000000000000000000000000000000000000001s) of the Universe are veiled in mystery. In the so-called Planck era the Universe expanded from 0 to probably about 10-35 meters (0.00000000000000000000000000000000001m). What is characteristic of that era is that we have no idea what happened. That's because there is no physical theory known to man that would help us understand processes at that scale. If you hear any speculations about what was going on during the Planck era, consider them on a par with answers to: "How many angels can fit on the tip of a pin."

At any point in human history there was an area of knowledge called science, and the rest, called magic. In contemporary physics, the term "quantum gravity" replaced the term "magic." It sound better--more "scientific." But, trust me, that's what it is!

Magic also gives us hope to fulfill our wishes. We could dream of magical ways of breaking the laws of physics, going back in time, or overcoming suffering and death. It can also prove to us that we are better than the rest of the universe--in particular, the dreadful machines. What is our brain, if not a finite automaton built from neurons? It's not even a Turing machine (which has access to potentially infinite tape--and we don't!). So if we make a copy of our brain using transistors and gates, it should have the same properties as the original. Including consciousness...

But that can't be! We are better than the soul-less machines!

Roger Penrose, an accomplished mathematician, comes to our rescue. He is very smart, so he figured out that physics couldn't help. Only magic can convince us that we are better than the machines. What machines lack is magic. People used to call it soul, spirit, lifeforce, and so on. We call it Quantum Gravity. I am not kidding you! Penrose believes that it's the quantum gravitational interactions in our brains that make us better than machines. He even found a good hiding place for them--the skeletal structures inside neurons, the microtubules, that are so thin that who knows, they may be harnessing QG. The convenient thing about QG is that we know nothing about it, so it can potentially explain anything.

Back to the Planck era. The Universe back then was driven by, you guessed it, quantum gravity.
 
 
Bartosz Milewski
07 March 2003 @ 04:54 pm
Q: Has anything existed before the Big Bang?
A1: The short (Clintonesque) answer is, "Define existed."
A2: The slightly more elaborate answer would go something like this: Time in our Universe started at the Big Bang. There was no time and no space before that, so nothing could have existed--in the sense in which we physicists understand existence. In other words this is a meta-physical question (meaning outside of physics) and I refuse to talk about metaphysics. As Ludwig Wittgenstein put it, "Wovon man nicht sprechen kann, darüber muß man schweigen," which means "If you have nothing to say, shut up!" Right on, man!