Saturday, January 17, 2009

Determinism

I wonder if the universe is deterministic.

Science shows tell me that even though virtually everything we see and experience is deterministic, on the atomic and subatomic levels, the universe instead operates probabilistically. I don't know nearly enough about QM to know if this is in any way true or if it's a result of an immense body of complex theory being distilled into a form suitable for the slightly-above-average TV viewer.

If the universe is deterministic, it has some interesting consequences.


"Fate" actually becomes correct, in a certain interpretation. Not in the "invisible people who decide what will happen in our lives" sense, but in the sense that because all interactions of matter and energy have only one possible outcome, if you know the state of the universe and all the laws that govern it, you can figure out what the state will be at an arbitary point in the future. The state of the universe is simply a function of time. Everything that happens was always "meant" to happen, although without the connotations of intent.


But even if the state of the universe is only a function of time, it is at the same time impossible to predict the future. Even if you had perfect knowledge of all the rules governing the universe, there is not enough matter and energy in the universe to simulate it (regardless of whether the universe is infinite or not). This is because simulation of a system is an inherently inefficient process. You will always need at least as much matter and energy to simulate a system as there is matter and energy in the system that you are simulating. (The most efficient simulator is the system itself, at which point you are no longer simulating!) Thus unless we are able to step outside the universe and somehow gain access to a separate quantity of matter and energy meeting or exceeding the sum of that which is in the universe, we cannot simulate the universe as a whole, and therefore cannot predict the future.

Another consequence is that there is no such thing as randomness. True randomness requires that at some point there has to be an event whose outcome cannot be known in advance, but since we are positing that all events have only one possible outcome, we cannot have a truly random event. Our concept of "randomness" really only refers to the fact that some sequence of events has no discernible pattern. The key word there is "discernible." The closest we can get to randomness in a deterministic universe is a process whose results depend on such a phenomenally large number of variables that we could not possibly comprehend the entire process involved in generating those results. We can't tell the difference between a truly random process and a process so complex that we can't find any patterns in it.

Blah, blah, blah.

Wednesday, January 14, 2009

Japanese Grammar

I liek Japanese grammar, so I'ma teach you some. (I am not a linguist or expert in the area in any way, and most of my experience in the language has been with a set of about ten native speakers in a fairly controlled, formal setting. Please let me know if I've made any mistakes, or if you have any other interesting things to add.)

There are three major word classes and some other minor classes. The minor ones are, more or less:

  • Particles: little grammatical words that serve to define the structure of clauses and sentences. Roughly, but definitely not always, correspond to prepositions and conjunctions in English.
  • Prenominals: a small class of words that have the odd distinction of being able to modify nouns while behaving a lot like nouns themselves. I think they derive from some older grammatical patterns which are no longer productive.
  • Copula: really derives from a contraction, it's the copula. The "linking verb," which often corresponds to some of the uses of the English "to be," but again, it's by no means a 1:1 correspondence.
And the three major ones:
  • Nouns: kind of a catch-all class for words that don't inflect and which don't fall into one of the minor categories. As such, it includes not only words that correspond to English nouns, but also adverbs, adjectives, pronouns etc.
  • Verbs: duh. They inflect and represent an action or change of state.
  • Adjectives: again, duh. They also inflect with forms similar to verbs, but there're differences, and there's not always an adjective inflection for a given verb inflection.
Predicates: Japanese has three kinds of predicates, one for each kind of major word class.

Verb predicates are pretty obvious. Japanese is a pro-drop language which means it really likes to leave out things that could be inferred from context. So, the subject of sentences is often left out and inferred. Thus, you can have one-word sentences - a single verb - that mean something.

Noun predicates consist of Noun + Copula. The copula inflects for pretty much all the same forms as verb predicates, although more irregularly (since it's derived from a contraction of "de" + "aru" - the "aru" verb part was inflected). Something like "hon da" is like saying "it's a book" in English - notice the correspondence between the copula and the use of the English "to be".

Adjective predicates are a little more interesting, since in English, adjectives can't function as predicates, only verbs. In Japanese, there's no need for a verb to make an adjective a predicate - the adjective alone is enough. So "akai" is a full sentence and means "it's red", or something like that. (Note that in distal (more polite) style, "akai desu" occurs. "desu" is the copula, but it's not really functioning the same way as "is" does in English. Its purpose is only to mark the adjective as being in the distal style, and it disappears everywhere else.)

Modifiers: here's one of the things I think is really cool. First off, you can modify nouns using adjectives just like in English - "red book" becomes "akai hon".

The interesting part is subordinate clauses. Japanese doesn't have a concept of a subordinating conjunction like in English. For example, we might say "that's the book that I bought last year." "that" is a subordinating conjunction and indicates that the following clause ("I bought last year") modifies the previous noun phrase ("the book").

So how does Japanese make a subordinate clause? Simple - the same way you use an adjective. Verbs can modify nouns. In fact, any time you modify a noun with an adjective or verb, it's more or less a subordinate clause. So "akai hon" can have two possible translations: "the red book" or "the book that is red". The translation of the verb phrase given above is "kyonen katta hon", literally "last-year bought book" - "the book that I bought last year".

Wait - adjectives are predicates, and so are verbs. We can modify nouns with either of them. What about nouns modifying nouns? Sure, we can do that too. In that case, the modifying noun's copula changes to an odd form - "no" or "na". "na" is used with many "adjective nouns", that is, nouns that function mostly or exclusively as adjectives/adverbs, but the "no"/"na" distinction is far from regular and in fact some nouns sound right with either one to a native speaker. In any case, an example would be "the pretty book": "kiree na hon". "kiree" is a noun, and works like a noun (like the sentence "kiree da" for "it's pretty"). An example of a "no" noun would be "boku", an informal male pronoun for "I", so "my book" becomes "boku no hon".

Pro-drop: As I mentioned earlier, Japanese is a pro-drop language - many times things are left to context and interpretation. Well, there's nothing explicit in the Japanese grammar that makes it like this - you could be very explicit about everything - but virtually everyone speaks it this way.

As an example, consider that you are telling a story about your day. In English, you might describe it like "first I did X, then I did Y. Then I found out something and I decided to come home, but not before I did Z." Notice how often the pronoun "I" appears. Japanese finds this redundant. Instead, a more Japanesey wording of this story would be something like "first did X, then did Y. Then found out something and decided to come home, but not before doing Z." "I" never appears. We sometimes speak like this in English, but it sounds kind of.. journaly.

Japanese does have a system of pronouns somewhat more complex than in English, but the fact is you don't really use it all that much simply because most of the time, either names are used, or nothing is used. For all those weeaboos out there who love to put poorly-worded Japanese in their forum signatures - please, for the love of all that is holy, take out the "watasi wa" at the beginning of every sentence. You are abusing the language horribly when you do that.

Related to this dropping phenomenon are the particles wa and ga. These are untranslatable words (particles) that follow noun phrases.

Now when we first learned about these particles, we learned that "wa" is sort of a contrastive particle, sometimes translatable as "at least". For example, "boku wa ikanai" means something like "I, at least, will not go." That is to say, someone else is probably going, but in contrast, I will not. Note that I'm using a pronoun here - this is actually one of the few places I've heard pronouns used: when contrasting with someone else.

On the other hand, we learned "ga" to be a sort of.. "indicational" particle. It indicates that someone/thing did something, but without the contrastive connotation that "wa" has. "ga" is also used with a certain class of verbs known as "affective" verbs, which are verbs in which there is no real actor, but only objects which are affected.

The reason I bring up "wa" and "ga" in relation to pro-drop is because of a more subtle phenomenon that we really didn't learn explicitly, but more implicitly as the years went on. Being a very context-sensitive language, each sentence then has to be interpreted within the scope of a context. This context is built up as you say things. "ga" is also used to bring new items into this context. If you are talking about a person or thing for the first time in this conversation (or in a while), you would use "ga" to indicate that. On the other hand, when referring to objects within the current context, "wa" can be used, and it doesn't seem to always have that contrastive connotation when used in this way.

I'm probably just making shit up, but I've noticed an odd correlation between these uses of "wa" and "ga" and the use of the English "a/an" and "the". "A/an" is used sometimes to bring up a new object in the conversation, and "the" is used with that object in subsequent utterances.

Phew: okay, enough writing for now.

Random Thoughts on the Perfect Language

There's no such thing.

Also, Lisp is already perfect and beat us to it by decades.


(Yes, those two sentences derive a logical contradiction.)


I'm not a Lisp weenie. I haven't drunk the Kool-aid. But the Lispers are right in a lot of ways. When your language consists of a single uniform data structure which represents both code and data, you can do a lot of really interesting things.


My exposure to the
D programming language has really opened my eyes as to the power of compile-time code generation and manipulation. Granted, string mixins and templates are just a hollow imitation of the power of true AST macros like Lisp provides. But it's made an impact on me nonetheless.

I can't shake the feeling that, no matter what the Lisp weenies say, the syntax of Lisp really has had an impact on its adoption as a mainstream language - that is to say, it hasn't been. It's probably more a product of the stigmas that have been associated with Lisp-style and C-style syntax since the early days of high-level programming. Lisp was way ahead of its time in a lot of ways, making it unusable for most programming tasks outside academia. C was made to be a low-level systems language. Thirty-forty years later, Lisp is still mostly in the realm of academia, and C-style languages still dominate the low-level end of the pool. For some reason, people don't seem to be able to take certain syntaxes "seriously" if they're used in a different realm than the realm in which their parent language was developed. You don't see many system-level BASIC languages in widespread use.

If we're to sell the benefits of Lisp to those who stick to C, then, we'd have come up with a syntax that is both palatable and familiar to them, as well as offering a lot of the benefits of Lisp-style syntax. A C syntax, but with a single unifying form with which all language constructs can be represented.

There's also the principle of "if it's different, it should look different" underlying the C syntax, something I wouldn't want to get rid of. The "omg parens" of Lisp aren't so much a problem with a sane (read: not Lisp-style) indentation and bracketing scheme, but even then it's still very difficult to pick out different kinds of operations when they're all represented with the same visual form and words. Mathematicians have a ridiculous amount of syntax to be able to compress ideas into tiny, elegant-looking formats. When you see a big sigma, you know that some sequence of numbers is being summed. It's much quicker to recognize than, say, (summation i 0 n (f i)).

No, I'm not really going anywhere with this. I'm just getting stuff down on.. paper. Screen? ..Internets?

Tuesday, January 13, 2009

Blogoblag

Derp, it's a blog. I have no idea what to put here.