Arbtirary thoughts on nearly everything from a modernist poet, structural mathematician and functional programmer.

Friday, April 25, 2008

Combinatorics

Counting is fun. It's just really enjoyable to sit there and figure out the most "elegant" way to solve a problem. It's really, really amazing that there are so many ways to approach the same problem, and as long as they count the same thing, they're the same.

It also is finally starting to give me a solid grasp of isomorphism. Not that the idea of isomorphism is difficult, just that seeing isomorphisms sitting there in front of you is difficult.

I think graph theory will fully solidify that idea for me.

Saturday, April 19, 2008

Functional programming in Perl!

Perl has Lisp-like lexical closures and it supports currying.

Both of these happen through perlref, a new feature in perl 5. Essentially, how it works is you can make anything a scalar ($) variable... anything. Sort of.

You can make a scalar variable that points to anything, which is, for the programmer, almost the same thing.

This way you can make a variable that is the curry of a function... I'm not going to go into the details, because my understanding of Perl is, well, yeah... It was fun to find out as I was searching for something else, however.

***
Perl, it seems, is a really fun language, for mostly opposite reasons from scheme. Perl's beauty comes from the amount of pre-imposed structure, but a very large language to work with. Pretty Perl is sort of like really well-written blank verse: it is going to have some obtuse words and awkward grammar, but it still flows well.

Scheme, on the other hand, comes from a small rule set, but a language which can be molded and formed as you please. Scheme would be comparable to some of Cummings better works: It follows (almost) no rules of language, but it drags you around the program nonetheless.

...
Or something like that. The poetry = programming analogy really falls flat under any rigorous scrutiny, but I hope I got the point across:
Perl- a lot of rules, but a lot of ways to exploit them
Scheme- few rules, meaning absolute freedom to exploit anything and everything.

Monday, April 14, 2008

Functions are the Numbers of the 21st Century

I went to two of the talks at Mengerfest today, (at the urging of a professor). They were unenchanting. Ellis's talk was a research talk, and so came with the dryness to be expected, while the material was interesting. Trefethen's talk would have been exceptionally interesting, were I a numerical analyst. Alas, I am no such creature.

After the talk someone commented about Trefethen's talk, and quoted Menger (apparently from a conversation): "Functions are the numbers of the 21st century."

That statement says a lot about the process of abstraction, and mathematical thought in general. Mathematics, (and it seems, with it, all of human thought) is tending toward increased abstraction. Originally integers were the epitome of mathematical abstraction; then rational and real numbers; then the Cartesian plane, complex numbers, and then sets.... With the 20th century developments of general abstract nonsense, topos theory and type theory, mathematics has climbed higher up this mountain than ever before.

There's a certain similarity in rules underlying all of these developments and abstractions-- they all work more or less the same. This implies (at least) one of three things:
1)The way we do math requires structures to exhibit similarities.
2)There is an inherent structure behind math... That is, the universe is design in such a way that there is a tremendously simple, yet elegantly complex structure.
3)The structures we impose are mental constructs. The fact that we are doing math requires these structures-- our mind cannot process abstract data in any other way.

Being me, I tend towards 1 or 3. 2 is too deterministic. 1, I think, presents more interesting applications: Is there another way to approach math, so that other structures develop?

And when I step back and examine the broader implications of 1,2, and 3, I realize, once again that it just doesn't matter. Math will still be conducted the same way; humans will continue to act roughly the same and life will continue as normal-- no interrupt to the daily scheduled programming.

If the different systems (that is, math, or the universe, or anything else) end up acting the same way, we have an isomorphism, right? So the systems can be considered the same, no matter how different the rules.

And I realized that more and more, this is why it's hard for me to give a shit when someone spouts self-righteous or otherwise ignorant nonsense: they'll continue acting the same. The system in which I said nothing at all is more or less the same as the system in which I correct their error, in the name of "Truth."

And at this point I've lost my train of thought... something on everything being the same, and so on and such... and I need to count some orbits.

Cheers.

Saturday, April 12, 2008

Philosophy of Math

I was thinking today about the various philosophies of math. Ideally, I'm a formalist, but more and more, I don't think that is quite right. Various other semi-formal positions seem to be a little closer to what I believe than formalism proper. Anyway, as I was considering this, I came to the conclusion that math would still be done by the same people, in the same way no matter which philosophy turned out to be "correct" (if there is one). With this realization I came full-circle, because it is such a formalist thing to decide: "it doesn't matter what it means outside of the system, because the system works the same way no matter what."

I'm also still bemused with Gödel's second theorem: For any formal recursively enumerable (i.e. effectively generated) theory T including basic arithmetical truths and also certain truths about formal provability, T includes a statement of its own consistency if and only if T is inconsistent. That is, any mathematical system that can express addition can not be proven consistent within the system. If it contains a statement proving its consistency, it means it is not consistent. Gödel's first theorem is likewise entertaining, but the basic idea of the second is just hilarious. It says that a mathematical system saying it is consistent is like someone saying "I have never lied." Everyone has lied at some point. Thus, we know that statement to be a lie... Only it's stronger in math.

Friday, April 11, 2008

Perl... and the pearl of great worth

Schlomo just sent me the scripts he's using to pick apart Shakespeare plays. They're really not that bad, but since (presumably) he's the only one who has had to deal with them, his documentation consists of #{file does this}. It makes it severely difficult to follow, when there are 10 scripts which assume things about each other. They are fair assumptions, but not helpful when you don't have the context to understand...

****
On another note, God has been active lately. We're all growing closer together, and it seems more people are slowly joining our community. It's really exciting

Saturday, April 5, 2008

Romans 8 (NIV)

Therefore, there is now no condemnation for those who are in Christ Jesus, because through Christ Jesus the law of the Spirit of life set me free from the law of sin and death. For what the law was powerless to do in that it was weakened by the sinful nature, God did by sending his own Son in the likeness of sinful man to be a sin offering. And so he condemned sin in sinful man, in order that the righteous requirements of the law might be fully met in us, who do not live according to the sinful nature but according to the Spirit.

Those who life according to the sinful nature have their minds set on what that nature desires; but those who live in accordance with the Spirit have their minds set on what the Spirit desires. The mind of sinful man is death, but the mind controlled by the Spirit is life and peace;
the sinful mind is hostile to God. It does not submit to God's law, or can it do so. Those controlled by the sinful nature cannot please God.

You, however, are controlled not by the sinful nature, but by the Spirit, if the Spirit of God lives in you. And if anyone does not have the Spirit of Christ, he does not belong to Christ. But if Christ is in you, your body is dead because of sin, yet your spirit is alive because of righteousness. And if the Spirit of him who raised Jesus from the dead is living in you, he who raised Christ from the dead will also give life to your mortal bodies through his Spirit, who lives in you.

Therefore, brothers, we have an obligation-- but it is not to the sinful nature, to live according to it. For if you live according to the sinful nature, you will die; but if by the Spirit you put to death the misdeeds of the body, you will live, because those who are led by the Spirit of God are sons of God. For you did not receive a spirit that makes you a slave again to fear, but you received the Spirit of sonship. And by him we cry, "Abba, Father." The Spirit himself testifies with our spirit that we are God's children. Now if we are children, then we are heirs-- heirs of God and coheirs with Christ, if indeed we share in his sufferings in order that we may also share in his glory

I consider that our present sufferings are not worth comparing with the glory that will be revealed in us. The creation waits in eager expectation for the sons of God to be revealed. For the creation was subjected to frustration, not by its own choice, but by the will of the one who subjected it, in hope that the creation itself will be liberated from its bondage to decay and brought into the glorious freedom of the children of God.

We know that the whole creation has been groaning as in the pains of childbirth right up to the present time. Not only so, but we ourselves, who have the firstfruits of the Spirit, groan inwardly as we wait eagerly for adoption as sons, the redemption of our bodies. For in this hope we are saved. But hope that is seen is no hope at all. Who hopes for what he already has? But if we hope for what we do not yet have, we wait for it patiently.

In the same way, the Spirit helps us in our weakness. We do not know what we ought to pray for, but the Spirit himself intercedes for us with groans that words cannot express. And he who searches our hearts knows the mind of the Spirit, because the Spirit intercedes for the saints in accordance with God's will.

And we know that in all things, God works for the good of those who love him, who have been called according to his purpose. For those God foreknew he also predestined to be conformed to the likeness of his Son, that he might be the firstborn among many brothers. And those he predestined, he also called; those he called, he also justified; those he justified, he also glorified.

What, then, shall we say in response to this? If God is for us, who can be against us? He who did not spare his own Son, but gave him up for us all-- how will he not also, along with him, graciously give us all things? Who will bring any charge against those whom God has chosen? It is God who justifies. Who is he that condemns? Christ Jesus, who died-- more than that, who was raised to life-- is at the right hand of God and is also interceding for us.

Who shall separate us from the love of Christ? Shall trouble or hardship or persecution or famine or nakedness or danger or sword? As it is written:
For your sake we face death all day long;
we are considered as sheep to be slaughtered.
No, in all these things we are more than conquerors through him who loved us. For I am convinced that neither death nor life, neither angels nor demons, neither the present nor the future, nor any powers, neither height nor depth, nor anything else in all creation will be able to separate us from the love of God that is in Christ Jesus our Lord.

Sylvia

I
The event of a lifetime is almost underway
The children laugh and sing, let them play.
The eyes of innocence look on and make another wish:
For wishes can come true when they are pure.
A candle burns, wax trickles down to rest on weathered wood
Between to chairs set facing through the glow.
The winter winter wind comes wandering in
To freeze the silent pose.
No matter how it tries, the candle glows.
No matter how it tries...

In one chair sits Sylvia
with sullen eyes and a weak chin,
next to Father Time with his shoulders black and grim.
They've been sitting there with steady glares
unblinking and unchanged,
contemplating something dark and lonely.
They've been sitting there for hours,
days, and, weeks, and months, and years,
waiting for their moment to arrive
The anthem plays a melody that's in and out of time.

The light that flickers only has one point of view
surrounding darkness makes itself a home.
The girl was of fine color and was shaped of gold;
the man was pallid white and set in stone.
The rose with frozen petals never withers in the sun.
The mind that never learns never forgets!
The winter wind comes wondering in
the freeze the heart and skin.
No matter how it tries the candle glows.

Twinkling lights and merry men are dancing in the street
as shining figures bustle to and fro.
The snow is softly falling like a blanket in the cold,
with fakes that warm the hearts of those who let them.
There is one place along the way that's dimly lit and grey,
but no one seems to notice in their joy.
The wintering wind comes wandering in to hear it's own self blow.
No matter how it tries, the candle glows.

In one chair sits Sylvia
with sullen eyes and a weak chin,
next to Father Time with his shoulders black and grim.
They've been sitting there with steady glares
unblinking and unchanged,
contemplating something dark and lonely.
They've been sitting there for hours,
days, and, weeks, and months, and years,
waiting for their moment to arrive.
Finally a slow grin played across her daring face,
and the old bag grew a look of sudden horror.
With that the old man died and smashed his wrinkled, balding head,
and the girl got up and left the room and went ot into the winter wind and...

II
She walked out through the snow.
She left the body there.
The flakes fell to her face,
and her face fell to the ground.
She listened as the chaos swelled around.
While the church ahead began to ring the bells
That thundering sound
lifted her to her feet and
she walked on.

She continued down the road.
The monotony had made restless beyond words.
She found a shovel and dug a big pothole.
Then a carriage crashed and made a big and deafening sound
Police gathered round.
The flakes fell to her face,
while her eyes
turned them to water.

The owner yelled and called her terrible names,
"Whore! Wench! What have you done?"
They cuffed her up and took her shovel away
but then the sun came out
and dried the stuff from her face.
She smiled sweet, apologized, and walked her self away.

Now you're hear in my heart
and you know who you are.
No one's going to clean up this mess:
the wheels have fallen off,
the current's gonna take you where you want,
but you keep on running,
The current's gonna make you who you are.
You know your smile's growing stronger,
while your stride is getting longer:
You're gonna make it out,
on your own.

~By the Butterfly Assassins
Creative Commons License Cory Knapp.