unsorted thoughts from Jonathon Anderson (old posts, page 7)

Go out and try to do that

Saw this on Reddit today:

I’m going to start sounding like a broken record on this, but read the gospels. Try this: make a list of things that Jesus commands his disciples to do. Before long you’ll get to something that sounds unreasonable. Go out and try to do that. Love somebody who’s an asshole to you. Give away a little more money than you’re comfortable giving. Take a couple of sandwiches to the park and sit down and share them with a homeless person.

If you begin living the lifestyle commands of Jesus and open your heart to him, you will slowly come into harmony with him, and he will be with you. He will be in you. This works.

~ EarBucket

In the beginning the church was a fellowship…

In the beginning the church was a fellowship of men and women centering on the living Christ. Then the church moved to Greece where it became a philosophy. Then it moved to Rome where it became an institution. Next, it moved to Europe, where it became a culture. And, finally, it moved to America where it became an enterprise.

~ Richard Halverson

Money As Debt

A few months ago, r/documentaries led me to Money As Debt, a documentary the models the world financial system on an atom of money creation through debt. Part 2 was posted yesterday.

The original video focused concluded with a proposal of money creation based on government spending balanced by government taxes to prevent inflation of currency. This second video seems to support Bitcoin (in everything but name).

The premise is presented convincingly and clearly, and seems to be a worthwhile perspective for the aid of understanding modern economics (even if shallowly). That said, I’m not an economist, and am easily drawn in by convincing arguments that wrap everything up for me neatly.

Is this as veracious as I perceive it to be? Assuming it is, how can we adjust our behavior, as individuals, to improve the situation?

Bioshock Infinite might finally convince me to by an Xbox

I just read Jeremy Parish’s interview with Ken Levine of Irrational Games where they discuss the AI of the non–player characters in Bioshock Infinite. The original Bioshock was the first game that made me want a 360, but I eventually played it on Steam. I bet my poor iMac couldn’t handle this, though… maybe I’ll have to purchase a 360 after all.

The AIs are constantly watching each other, too. There’s a part where a guy runs into another guy and knocks him over and starts beating on him. The way that works is, that’s not a script, it’s an A.I. going, “Hey, I’m available for something cool.” And another A.I. goes, “You know what I can do? I can come over and beat the shit out of you.” And the other A.I. says, “OK, cool, let’s do that.” But they can only do that in the right situation. Are they being shot at? OK, then no, they can’t do that. Is something else going on? No, they can’t do that. We have this whole library of content – that library, for instance, or Elizabeth saying this or doing that – but the system is constantly monitoring the playing and saying, “Is this the right time? Is this the right time?” And that’s the most challenging thing we’re doing with this game.

~ Ken Levine

Magnatune, Braid, and Robin Stine

Someone mentioned Braid in my presence again, which threw me into yet another period of not being able to get that beautiful soundtrack out of my head. I knew that the soundtrack was licensed from a number of Magnatune artists, and that they had a soundtrack album for the game available; but they’ve added “you are listening to Magnatune” advertisement blurbs into the tracks for non-paying streamers.

Message received, Magnatune. I’ll subscribe. After all: your tagline is, “We are not evil.” How bad could that be?

Anyway: my newfound high-quality download privileges have provoked some exploration of the Magnatune catalog, where I discovered Robin Stine. She only has one album, Daydream, published, but it’s pretty good. If you like female vocalist jazz. Which I apparently do.

therefore, let us not judge one another anymore…

Therefore let us not judge one another anymore, but rather determine this—not to put an obstacle or a stumbling block in a brother’s way. I know and am convinced in the Lord Jesus that nothing is unclean in itself; but to him who thinks anything to be unclean, to him it is unclean. For if because of food your brother is hurt, you are no longer walking according to love. Do not destroy with your food him for whom Christ died. Therefore do not let what is for you a good thing be spoken of as evil; for the kingdom of God is not eating and drinking, but righteousness and peace and joy in the Holy Spirit. For he who in this way serves Christ is acceptable to God and approved by men. So then we pursue the things which make for peace and the building up of one another. Do not tear down the work of God for the sake of food. All things indeed are clean, but they are evil for the man who eats and gives offense. It is good not to eat meat or to drink wine, or to do anything by which your brother stumbles. The faith which you have, have as your own conviction before God. Happy is he who does not condemn himself in what he approves. But he who doubts is condemned if he eats, because his eating is not from faith; and whatever is not from faith is sin.

~ Romans 14

Great is thy faithfulness

Earlier I posted about how I forgot to get an exit visa for our imminent trip to the US. I made short order of filling out the paperwork; and, by all accounts, everything went very smoothly. Signatures were given; documents were presented; and the government affairs department processed my application more quickly than I had seen before. (I was told that I would have our visas in two days, and we did!)

I can still remember vividly the state I was in the night before work that week. I had been characteristically positive about the whole thing: “It’ll be alright.” “It’s never taken more than five days.” “Good thing we remembered now.” I had to be. If I wasn’t, I’d drag Andi down, too.

But that night, as I laid in bed, a feeling of helplessness came over me. I knew that it had been my mistake… my carelessness that had put us in this situation. What if we didn’t get our visas in time? What if Eid came before the process was complete and the week of celebration became an unstoppable countdown to financial and personal loss?

The worst part was that I was stuck in sleepless worry with nothing I could really do, physically, to improve the situation. The government affairs office wouldn’t be open until the morning. Still I laid awake.

(Some scheduling information: we were leaving the week after Eid; so if we didn’t have our visas by Eid, we would be on campus, as planned, but stuck in the knowledge that we could do nothing to get our visas before we were supposed to leave.)

So I prayed. I talked with my father about the worry I felt. About the shame of being careless. About the possibility of letting Andi down. Of letting our families down. Of being irresponsible with the money that he has given us. (Flights to the US aren’t cheap from here, after all.)

I’ve been a student of scripture for a long time: I know that our father cares for us, and that he guides us in his path for our lives. I knew that my faith, however mundane the circumstances, was faltering. I was putting my trust in myself, not in him; and I was letting myself down.

Like I said: everything went pretty well, starting the next morning; I felt a little better when the government affairs representative assured me that we would have our visas before Eid; I felt a little better when his prediction left us with two days of leeway; but I didn’t really calm down until I had the paper in my hand.

Of course, now I’m on the other end of the experience, and I can talk about faith in God with the calm demeanor of someone who isn’t being confronted by it; but maybe I can learn something now, through prayer and study, that will give me peace when I’m in a position to fail myself again.

All things work together for good

My mind first turns to Romans 8.

And we know that God causes all things to work together for good to those who love God, to those who are called according to His purpose.

My familiarity with scripture is never what I want it to be, so I stumbled around a bit until I found Philippians 1, where Paul gives a more explicit example of what a life lived by faith looks like.

Now I want you to know, brethren, that my circumstances have turned out for the greater progress of the gospel, so that my imprisonment in the cause of Christ has become well known throughout the whole praetorian guard and to everyone else, and that most of the brethren, trusting in the Lord because of my imprisonment, have far more courage to speak the word of God without fear. Some, to be sure, are preaching Christ even from envy and strife, but some also from good will; the latter do it out of love, knowing that I am appointed for the defense of the gospel; the former proclaim Christ out of selfish ambition rather than from pure motives, thinking to cause me distress in my imprisonment. What then? Only that in every way, whether in pretense or in truth, Christ is proclaimed; and in this I rejoice.

Yes, and I will rejoice, for I know that this will turn out for my deliverance through your prayers and the provision of the Spirit of Jesus Christ, according to my earnest expectation and hope, that I will not be put to shame in anything, but that with all boldness, Christ will even now, as always, be exalted in my body, whether by life or by death.

For to me, to live is Christ and to die is gain. But if I am to live on in the flesh, this will mean fruitful labor for me; and I do not know which to choose. But I am hard-pressed from both directions, having the desire to depart and be with Christ, for that is very much better; yet to remain on in the flesh is more necessary for your sake. Convinced of this, I know that I will remain and continue with you all for your progress and joy in the faith, so that your proud confidence in me may abound in Christ Jesus through my coming to you again.

Here is Paul, imprisoned for his teaching; but he knows (and has evidence after-the-fact) that God is using his imprisonment for good. I think, in particular, about the praetorian guard; how, if Paul’s ministry had been simpler, playing out as I would have chosen for myself, it wouldn’t have touched these people.

There are many examples of men walking in faith throughout history; and nowhere are they chronicled more compellingly than they are in Hebrews 11. Continuing on in chapter 12:

Therefore, since we have so great a cloud of witnesses surrounding us, let us also lay aside every encumbrance and the sin which so easily entangles us, and let us run with endurance the race that is set before us, fixing our eyes on Jesus, the author and perfecter of faith, who for the joy set before Him endured the cross, despising the shame, and has sat down at the right hand of the throne of God.

James would point out (as he does in James 2) that the faith we see here doesn’t exist in isolation, but is evidenced in works. Faith, if it exists, must affect our actions. Otherwise, it’s just a lie we tell ourselves.

What use is it, my brethren, if someone says he has faith but he has no works? Can that faith save him? If a brother or sister is without clothing and in need of daily food, and one of you says to them, “Go in peace, be warmed and be filled,” and yet you do not give them what is necessary for their body, what use is that? Even so faith, if it has no works, is dead, being by itself.

But someone may well say, “You have faith and I have works; show me your faith without the works, and I will show you my faith by my works.” You believe that God is one. You do well; the demons also believe, and shudder. But are you willing to recognize, you foolish fellow, that faith without works is useless? Was not Abraham our father justified by works when he offered up Isaac his son on the altar? You see that faith was working with his works, and as a result of the works, faith was perfected; and the Scripture was fulfilled which says, “AND ABRAHAM BELIEVED GOD, AND IT WAS RECKONED TO HIM AS RIGHTEOUSNESS,” and he was called the friend of God. You see that a man is justified by works and not by faith alone. In the same way, was not Rahab the harlot also justified by works when she received the messengers and sent them out by another way? For just as the body without the spirit is dead, so also faith without works is dead.

This doesn’t paint me in the best light, of course: but I knew that. I claimed faith in God–even with the knowledge that anything that could happen to me would be within his plan for my life–but when that faith was tested, my actions fell short. My faith was in word only. Maybe that’s why I got my paperwork in the end: not because I so desperately needed to travel to the US; but because, were I to miss out, my reaction would be a hindrance to those around me, rather than a witness. Again, I think of Paul, imprisoned, sharing his faith with his captors.

Forgiveness, and second chances, are welcome respite.

Great is thy faithfulness

All of this has been about me though, and that’s missing the point. It’s not about my faith, or the strength of my faith, or some arbitrary, disconnect ability that I have to put faith in things. The power of my faith is not my own, but is God’s. I could choose to put my faith in myself; in political leaders; in charismatic teachers; but the value of that faith is limited to the faithfulness of the one you trust. Compared to God, we all fall short. That’s why it’s so amazing and awesome that we have him.

Your lovingkindness, O LORD, extends to the heavens,
Your faithfulness reaches to the skies.

Psalm 36

And, of course, there’s always the classic twenty-third Psalm

But, in the end, the ultimate expression of appreciation for God’s faithfulness, in my mind, comes in Lamentations 3. I didn’t know that, but Wikipedia tells me that it served as the inspiration for the timeless hymn.

Great is thy faithfulness, O God my Father;
there is no shadow of turning with thee;
thou changest not, thy compassions, they fail not;
as thou hast been thou forever will be.

Summer and winter and springtime and harvest,
sun, moon and stars in their courses above
join with all nature in manifold witness
to thy great faithfulness, mercy and love.

Pardon for sin and a peace that endureth
thy own dear presence to cheer and to guide;
strength for today and bright hope for tomorrow,
blessings all mine, with ten thousand beside!

Great is thy faithfulness! Great is thy faithfulness!
Morning by morning new mercies I see;
all I have needed thy hand hath provided;
great is thy faithfulness, Lord, unto me!

I’ve been staying away from the topic of salvation through faith because it’s such a large topic on its own; but we shouldn’t forget to remember that the ultimate expression of God’s faithfulness points back to the promise that he made so long ago: to fix us and our world; to conquer death; to cleanse us of our sins (even the sin of faltering in our faith); even so far as to sacrifice his son, the Christ.

Sometimes my faith is weak, but your faithfulness is so great!

backporting sudo’s #includedir

sudo version 1.7.2 (possibly earlier) adds the ability to fragment the sudoers file into smaller chunks via an #includedir directive. This is a boon for our use of puppet, as it affords us the ability to configure sudo in multiple modules at the same time, rather than centralizing all of our privilege escalation information in one module.

class s_gpfs
{
    [...]

    file
    { '/etc/sudoers.d/nrpe-mmfs':
      content => "nrpe ALL = NOPASSWD: /usr/lpp/mmfs/bin/mmgetstate\n",
      owner   => 'root',
      group   => 'root',
      mode    => '0440',
    }

    [...]
}

Here, we allow the nrpe user (part of our automated monitoring infrastructure) to run the gpfs command mmgetstate as root.

Unfortunately, we also have to support systems who’s sudo implementation predates this new feature. (cough SLES 10 cough) In order to provide this functionality forward–compatibly, I wrote a Python script that inlines the contents of files as indicated by an #includedir directive that would otherwise be ignored as a comment in older versions of sudo.

#!/usr/bin/env python


import sys
import re
import glob
import os
import fileinput


include_directive = re.compile(r'^[ \t]*#includedir[ \t]+(.*)$')


def main ():
    for line in fileinput.input():
         match = include_directive.match(line)
        if match:
            directory = match.group(1)
            sys.stdout.write(inlined_content(directory))
        else:
            sys.stdout.write(line)


def inlined_content (directory):
    files = get_files(directory)
    return ''.join(read_all(files))


def get_files (directory):
    return [f for f in glob.glob(os.path.join(directory, '*'))
            if os.path.isfile(f)]


def read_all (files):
    for file_ in files:
        try:
            yield open(file_).read()
        except IOError:
            yield ''


if __name__ == '__main__':
    main()

exit visa | USA trip, 2011

On 1 September we’ll be making our next trip back to the states to see friends and family. We’ve been looking forward to it for quite a while. Breaking with tradition, I’ve had everything planned out pretty well ahead of time: airline tickets, en–route meetups, busses…

That is the mindset I was in this weekend, as I took a leisurely walk through the campus with a couple friends. No worries. Carefree.

Until I realized that I had forgotten to file for the renewal of Andi and my exit (and re–entry) visas.

“No problem,” I thought: “We have two weeks, and it’s never taken more than one to get them.”

Then I remembered that the second of these two weeks was Eid: non–essential government services would be shut down during the break, including visa paperwork.

I couldn’t sleep on Friday night: what if we didn’t manage to get our visas on time?

On Saturday morning (the beginning of my workweek) I was in the office by six–thirty, filling out the visa request forms. They require my manager’s signature; and though he wasn’t in the office this week, he had signed copies turned around to me via email in under an hour. The government affairs department assured me that I’d have our visas before Eid–likely Monday–which did some to allay my fears; but I wouldn’t be able to stop worrying about the potential impact of my carelessness until I had those strange pieces of paper stapled in the back of our passports.

Today, I feel so much better.

webbrowser | Python Batteries

Today’s reverse spelunking through the Python standard library reveals the webbrowser module. As a library, it allows a Python application to interact with the default web browser on the host OS, opening a url in a new browser window or tab. This functionality is exposed at the shell, as well:

$ python -m webbrowser
Usage: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/webbrowser.py [-n | -t] url
    -n: open new window
    -t: open new tab

You can use the webbrowser module like this to open web pages from any shell or shell script.

$ python -m webbrowser -t http://www.civilfritz.net/

The module does what it can to do the right thing given your environment, and will open a browser on X11, OS X, Windows, and will even open a text–mode browser if no graphical browser is available.

I noticed (on OS X, anyway) that if you don’t specify a protocol (e.g., http) you get an exception.

$ python -m webbrowser -n www.civilfritz.net
0:39: execution error: An error of type -2110 has occurred. (-2110)

The browser still opened successfully, though.

You can find more information on the webbrowser module at the Python website.