Chad Perrin: SOB

20 April 2007

adjusting the syntax of Fei Ling’s Y combinator

Filed under: Geek — apotheon @ 02:24

On the subject of why — or, in this case, Y . . .

At Fei Ling’s website, there’s an example of constructing a Y combinator. I looked at it, and thought “Wow, this is what people must mean when they say someone writes Ruby like Perl — or even C.” I decided to adjust very superficially to make it better match a Ruby idiom. If anyone would care to share an even better implementation, I’d be happy to see it. Here’s Fei Ling’s version:

Y = proc {

proc { |g| g[g] }.call( proc { |h|

              proc {



Here’s mine:

Y = proc do |f|
  proc {|g| g[g] }.call(
    proc do |h|
      proc {|n| (f[h[h]])[n]}

I think that’s correct, anyway. At least, irb doesn’t complain. Now, I’ll repeat Fei Ling’s question: For what, exactly, do I use this?

the introvert blogger

Filed under: Metalog — apotheon @ 01:40

Sake-drunk and half-asleep, I find myself thinking about how I present myself to the world. The truly self-aware must think of these things all the time. I, being merely human, only think of them when they occur to me as a result of some train of thought that makes me question what subconscious motives might underlie the obvious. Why do I do what I do? How much of it is for the purpose of presentation?

I find myself at times caught between appearance and achievement. There are things I really want to achieve — but I don’t know how to do so. In fact, there are simply things I want achieved, whether I achieve them or not, and wish I knew how to make them occur. These are the things that, when I look at the direction of things in the world, appear to be headed in entirely the wrong direction. I think: If only I knew the right thing to do, the right thing to say, perhaps I could serve as a catalyst, set things in motion to derail these trends and send future history toward different conclusions than those that seem obvious and inexorable along the current track. How could I help eliminate specific institutions that infringe upon individual rights, like patent law and simple inanities like speed limits? What could I say to induce people to rise up en masse to demand a repeal of the Military Commissions Act? Is there some action I could take to see a return to strict observance of the protections set forth in the Bill of Rights (if indeed that strict observance ever existed)?

I examine these achievements that have not occurred, and I see that society trends toward making them ever more difficult a dream to believe. I wonder — if I don’t do something, who will? Will anyone act? Will anyone speak those magic words that will wake others from their sleepwalking through life?

I find, from time to time, that I want to be well-known, and well-respected. All desires have goals, though — and I must examine these as well. Frankly, I find even the paltry attention that I receive from writing here in SOB can get on my nerves sometimes. In truth, half the comments I get here (especially lately, with the responses to things like my comments about the GPL and the Debian GNU/Linux distribution) just frustrate me and make me think “Isn’t this obvious? Do I really have to deal with this?” I am affirmed in these moments as the introvert I am, but still, I feel almost obligated to respond, to explain, and to clarify. I feel that I must present something to which those who agree with what I have to say can adhere, to improve the chances that they’ll listen to what I have to say and, perhaps, draw others to do the same. Ultimately, this behavior is about building an audience.

As friend Sterling is fond of asking, perhaps this is the answer to the question “Why do I blog?” It wasn’t always the answer, but it is what my answer seems to have become. I’m drawing an audience, and using it. Yes, I’m using you — all of you, my readers. That’s kind of a strange statement to be making, I suppose, especially considering that I’ve been reading about antisocial personality disorder lately (I got a copy of The Sociopath Next Door for Christmas, and while it’s a mediocre book it’s still causing me to think quite a bit about the subject). It’s true, though. I’m using you — not merely as means, as I’m sure Immanuel Kant would be glad to hear, but I’m using you just the same. I am, in a manner of speaking, using you in complete, brutal honesty, building my own audience, adding to the aggregate of people I use to get various messages out into the open, largely for two purposes:

  1. to continue building an audience
  2. to better spread ideas that can benefit us all

If it wasn’t for purpose number 2, I’d probably rather that most of you go to hell than deal with the fact that you’re paying any attention at all to what I have to say. Most of the time, I’m perfectly happy to be at home, alone or with my SigO, where I don’t have to give anything I don’t want to give. Truth be told, it’s exhausting dealing with an outside world. A little stimulation is useful, and this non-realtime text-based interaction takes a lot of the work and annoyance out of it, but I don’t even know most of you. Of those I haven’t met in person, I’ve exchanged words with maybe two percent of my readers (maybe) enough to decide that I might like you if we did meet.

I don’t pretend to like anyone — not even if they control my paychecks. I do, however, put a lot of work into interacting enough so that people can decide for themselves whether they like what I have to say. It is, indeed, a lot of work for me. Introvert, y’know. That’s why I burn out on something and take a week or so off, even when I think what I’m doing might be important in some way. That’s why, when I set out to accomplish something and others express a little interest, I sometimes back-burner the thing for months at a time — because the burden of outside interest isn’t matched by the enthusiasm of enough interest to keep me going.

. . . but, in the end, if I don’t have some interest from others, I’m not going to accomplish much on my own. I’ve given up a long time ago on the high school dream of having seventeen cars and being a multimillionaire while changing the world. Now, I’m just trying to figure out how I can get enough people paying attention so that, among them, someone who can change the world might be inspired by what I have to say.

In the meantime, I’m hoping to run across a few people with whom to commiserate and get along. That’s the only part of the whole deal that isn’t a crap shoot.

By the way . . . what I drank was Momokawa Diamond junmai ginjo sake. It’s a reasonably refreshing and clear flavor with an unfortunate, but mercifully mild and brief, acidic aftertaste. It was evidently a gold medal winner at the 2005 Taster’s Guild International Wine Judging, which makes me think that these people haven’t had the best that seishu (what we boorish Americans call sake) has to offer.

All original content Copyright Chad Perrin: Distributed under the terms of the Open Works License