Idealog

splashy water zen
Posted by Beth on 2004-08-10 15:15:21 UTC. (permalink)
splashy water

()

Posted by Chris on 2004-08-05 03:20:21 UTC. (permalink)

I have no idea why, but for some reason every now and then (around once a month or so), I'll get some random person IMing me on my AIM account. Of course, since this seems to me to be on the same level as telephone spam telemarketing calls, but with less stringent quick-thinking requirements, I decided to have some fun.

So, here's a transcript of my most recent one:

warmhandsovenman: Have you ever read The Count of Monte Cristo by Alexandre Dumas?
Me: no
warmhandsovenman: Why not?
Me: insufficient time
warmhandsovenman: What type of books do you like?
Me: good ones
Me: of course, there have to be other incidentals
warmhandsovenman: Like Sci-Fi?
Me: e.g. the background and foreground colors have to be different
Me: a book can be the best book in the world, but if it's white type on a white page, I won't like it
Me: also, it should be made out of paper
Me: beaten copper looks nice, but it's too cumbersome to actually read
warmhandsovenman: I see.
Me: and engraved stone is right out
warmhandsovenman: How many books per month would you say you read?
Me: incidentally, why are your hands warm?
Me: do you keep them in gloves all the time?
warmhandsovenman: No, it's an inside joke with my friend.
warmhandsovenman: How many books would you say you read per month?
Me: lifetime average?
warmhandsovenman: Yeah.
Me: including the years where I was pre-literate (e.g. 0-3)?
warmhandsovenman: I see.
warmhandsovenman: Who's your favorite author?
Me: favorite in what sense?
warmhandsovenman: The author who you think writes your most enjoyable nooks.
warmhandsovenman: books*
Me: G.K. Chesterton
warmhandsovenman: Cool.
warmhandsovenman: What's the farthest you've ever ran non stop in your life?
Me: how picky are you about the definition of "run"?
warmhandsovenman: I mean what's the farthest you've ever ran/jogged in your life?
Me: how picky are you about the definition of "non stop" (and shouldn't that by hyphenated, i.e. 'non-stop'?)?
warmhandsovenman: Yeah, but I don't type in correct puncuation online. I mean non-stop like the farthest without walking.
Me: so would it count to run, stop (without walking), then start running again?
warmhandsovenman: No.
warmhandsovenman: Now can you answer it?
warmhandsovenman: How far?
Me: Not yet
Me: Are you defining 'life' in the secular sense of one time from fetus to corpse
Me: or do you allow for 'past lives', as in the hindu, budhist, or certain ancient greek conceptions?
warmhandsovenman: I ment life as in since you were born out of your mom in the hospital.
Me: if you look carefully at my question, you'll notice that within reincarnation schemes, that can be arbitrarily far ago
Me: but I presume that you mean the 1 fetus-to-corpse cycle
Me: counting any jogs one's mother took as being her runs, not your own
Me: correct?
warmhandsovenman: No.
warmhandsovenman: I mean how far have you ran non-stop in your life, the beginning being your way out of your mother's vagina.
Me: bear in mind that if you allow for reincarnation, the passage through one's mother's vagina (incidentally, this question doesn't apply to me outside of any reincarnative possibilities since I was born by C-section) arbitrarily many times, once per future life, so you're not asking a well-defined question (in the mathematical sense of the phrase "well-defined").
warmhandsovenman: GOD
warmhandsovenman: JUST F---ING ANSWER THE QUESTION.
warmhandsovenman: ROUGHLY.
warmhandsovenman: I DON'T CARE ABOUT ANY OF THIS WELL DEFINED S--T.
Me: I'm curious. Why do you think that being rude to me is going to persuade me to do you any favors, such as answering your questions?
warmhandsovenman: Because with all of your previous contradictions, I view you as a person that isen't normal and is an insecure nerd.
Me: How on earth does that lead you to the conclusion that being rude will induce me to do you favors?
Me: And, incidentally, what contradictions are you referring to?
warmhandsovenman: I asked you a question of how far you've ran. A NORMAL person would say "Oh, about so-so many miles..." and insted you contradict everything saying all this s--t that no one cares about and you haven't answered the question yet.
warmhandsovenman: So how many miles?
Me: Are you familiar with the definition of "contradict"?
warmhandsovenman: Here we go again.
Me: Allow me to be of service:
warmhandsovenman: You're a nerd with no life.
Me: Contradict \Con`tra*dict"\, v. t. [imp. & p. p. {Contradicted};
p. pr. & vb. n. {Contradicting}.] [L. contradictus, p. p. of
contradicere to speak against; contra + dicere to speak. See
{Diction}.]
1. To assert the contrary of; to oppose in words; to take
issue with; to gainsay; to deny the truth of, as of a
statement or a speaker; to impugn.
[1913 Webster]

Dear Duff, I prithee, contradict thyself,
And say it is not so. --Shak.
[1913 Webster]

The future can not contradict the past.
--Wordsworth.
[1913 Webster]

2. To be contrary to; to oppose; to resist. [Obs.]
[1913 Webster]

No truth can contradict another truth. --Hooker.
[1913 Webster]

A greater power than we can contradict
Hath thwarted our intents. --Shak.
[1913 Webster]

Me: Dude, I'm not the one IMing random people on a wednesday night
warmhandsovenman: How are you random?
Me: Well, you don't know me
Me: And, not knowing me, it seems far-fetched that you could have carefully selected me for this series of questions of highly dubious relevance to anything you might have learned about me prior to IMing me.
warmhandsovenman: Okay.
warmhandsovenman: You're cool.
warmhandsovenman: I'm sorry.

And when I next said something to him, he was gone.

(In the interests of full disclosure, I corrected a typo in my last sentence from "serious" to "series" in the interests of readability. Also, I redacted the profanity of my unknown conversational partner.)

(In the interests of defending myself, that definition was copy-and-pasted from the unix program dict. As for the charges made against me in this conversation, I am most certainly not a nerd with no life. I'm a nerd with a beautiful girlfriend.)

new camera
Posted by Beth on 2004-08-04 16:57:18 UTC. (permalink)

I got a new camera, boyfriend is obsolete.

It's a Canon PowerShot S50. 5MP and manual everything. Here are some pictures I took when I was playing around with it.

In other news, Space Age Pop Music makes for excellent coding music. You listen long enough, and somehow the bugs in your code stop bothering you. Everything is OK so long as you have enough xylophone-backed hawaiian chants to listen to. Ahhhh.

()

"The Curious Adventures Of John Chapter 2"
Posted by Chris on 2004-07-29 02:19:24 UTC. (permalink)

Chapter 2

They stayed, staring at each other, for nearly a minute. It was Arcelia who broke the silence.

"Who are you? And what, exactly, have you done?"

"Call me Ramirez. What I've done, depending on how you would like to look at it, is avenge over two decades of brutality and barbarism or kill your parents and the seventeen men your father had hired as guards (incidentally, it is convenient that your maid visits her family every third Sunday).

"For what it's worth," he added, "I'm sorry for causing you suffering."

After a few moments, Arcelia broke the silence again, "And you want me to go with you?"

"I never said that I wanted anything. I made you an offer. I do think that you would be wise to accept it, but that doesn't mean that I do — or don't — want you to."

Almost impulsively, Arcelia asked, "Well, what do you want?" Like all human beings, she had the instinct to seize the initiative, even if she had no idea what to do with it once she had it.

John smiled, his eyes twinkling devilishly. "I want to be a dragon. I want a body the size of a school bus and a tail longer than a snake. I want wings the size of the sails on a ship, teeth sharper than a needle, and breath hotter than hell. I want to soar among the clouds like a bird and look down on all the beautiful world. I want to be more than a man and have none of Man's vices."

Arcelia didn't know how to respond. She wanted control of the situation, or the conversation, or something. She couldn't think of how to get it. Finally, she said, "Whether or not I accept your offer, if you're so concerned about my welfare, please don't joke with me."

"I was quite serious. That is what I want. That it's not terribly relevant to the moment is true, but it's your business why you want to know this now, not mine."

"Why are you being so literal?"

"Why aren't you?"

"Why have you offered to bring to me civilization?"

"Because you are in danger."

"Because of you!"

"Exactly."

"Well, then, if you were so concerned about me why did you put me in danger?"

"Because I could also get you out of it."

Arcelia paused and thought for a moment. His responses were all reasonable — but for an insane situation. Was it really possible that he did what he claimed? Was it really possible that her family and all of their guards were dead? She hadn't really started to believe it yet, but it was really starting to worry her that no one had come in response to her screams earlier. Enriqué should have come running within a few seconds. Could everyone be in the far side of the house for some reason? Could they have left her all alone in her room and this crazy stranger wandered in somehow?

"I take it that you won't mind if I walk around and make sure that you're telling the truth about my family?"

The idea that this strange man could have been telling the truth about her family had not really sunk in, and she was mostly concerned with keeping him calm while she found out what was really going on.

"That's as you please. I hope that you have a strong stomach."

It disconcerted her that he didn't mind. She had expected that he would find some excuse to keep her from looking around. Still, she had to find out what was going on and she couldn't be in any more danger leaving her room than she was staying there with "Ramirez".

Arcelia slowly got up and put on her night robe, keeping her eyes on Ramirez. She had no real reason for watching him — if he was going to jump her he could more easily have done that before waking her up.

She didn't admit it to herself, but she watched him because of his calm confidence. He had turned the world on its side, but he was standing upright in the tumult he caused. He was at once an angel and a devil, and whichever side predominated he seemed, at least, to know what was going on.

Arcelia slowly walked out of her room. She had half-expected to see corpses in the hallway, and was a little relieved that there was not so much as a bloody footprint. She walked past the two rooms reserved for her sisters when they visit and went to her parents room. Taking a deep breath, she pushed the door open. Scarcely a moment later, she shut her eyes and turned from the grizzly scene, driving her head into her hands as if she could undo what she saw if she just pressed hard enough.

"No... No..." she said, as if to someone. After a moment, she opened her eyes and looked for John. She felt many things, but above all she was confused. Grief, understanding, even anger — all these things had to wait until she figured out what was going on now.

She hadn't heard him come after her, but he was only a few feet behind her. He was just standing there, with a look somewhere between compassionate and curious, respectfully silent. Arcelia stared into his eyes. She swallowed and took a deep breath, preparing to speak. It was some minutes before she could speak, though. Every time she opened her mouth to try no words would come.

At last she said, quietly, "So it is true?"

"Yes," he said gently.

"Do I really have a choice?"

"Yes."

"Do you really consider dying in the jungle to be a choice?"

"Yes, though it is not certain that on your own, you would die. Nothing in this world is certain until it happens."

"You're quite the philosopher."

John spoke in the same gentle voice, but there was a hint of a smile on his face: "Yes."

Arcelia sighed. He almost laughed at the absurdity of her situation.

"What should I do?" she asked. "What would you do, if you were me?"

"If I were you," he said thoughtfully, "I would accept my offer.

"If I meant to do anything bad to you, I would surely have done it by now. If I wanted to harm you, there was no reason to wake you up. Even if i wanted to kidnap you and deliver you to some vengeful associates of mine — incidentally, there's no one that I know of who holds a grudge against you — even if I had wanted to kidnap you, I could have just tied your hands and forced you to walk behind me.

"So, all things considered, it wouldn't seem very likely that I was being deceptive in my offer, or at least, if I was, my deception would be too subtle to discover just by thinking about it. So I would accept.

"But what shall you do?"

Arcelia thought for a moment. "I'll come with you. So, what now?"

"You should pack some rugged clothing in a bag. Long pants and long-sleeved shirts, if you have them. Also socks, underwear, etc. Also, you'll want to bring money, as it will be useful to you once we get to town. I'll carry the bag for you, so it's OK if it's heavy, though please don't be ridiculous about it."

Arcelia did as John suggested and within half an hour they were off.

Canadian government demands nude pictures
Posted by Beth on 2004-07-28 21:03:52 UTC. (permalink)

This is the best story I've seen all day:

The potential dancers have to prove they can dance in the nude, immigration lawyer Mendel Green said Monday.

"They can't be partially nude," he said. "If they don't have pictures in the nude, they are not going to wiggle their bottoms in Canada."

Thank you, boingboing!

()

Posted by Chris on 2004-07-27 23:16:19 UTC. (permalink)

Eugene Volokh has discussed another of Slate's Kerryisms. The original quote, in response to the question, "Is abortion a great moral issue to you?", is:

Sure it is. Absolutely. And I think it's far more complicated than public life allows the discussion for. I mean, being for choice does not mean you are for abortion. Neither Teresa nor I are for abortion. Abortion should be rare, but safe and legal, as President Clinton said so often, and I think appropriately.

I think that it's really a question of who should make this decision, and how do arrive at it. But there is morality. Of course there's morality involved. And we should be talking to people in America about responsibility, about adoption, about other choices. And I want to have a better conversation than I think we've had on it. But it doesn't change my position on who chooses. And I will protect that right of choice.

Which Slate summarized, in their Kerryism fashion as, "Sure it is. Absolutely." (with the rest of the quote following as footnotes.)

Eugene then says:

If Kerry had said that, he would have been seen either as a fool (someone who thought the question called for a yes-or-no answer) or as evasive (someone who knew the question called for an explanation of his moral stand, but who chose to duck it by pretending that the interviewer was looking for a yes-or-no answer).

The problem is that I believe that Slate actually has a point here, though their format doesn't allow them to accurately summarize Kerry's quote. If one is not bound to use only his words, saying what he said more simply, it was, "Like so many Americans, I straddle this issue."

How, he said it like an idiot, but I suspect that this is primarily due to it having been in a live interview (with Larry King), and most people sound like idiots when you're reading a transcription of a live interview with them. However, to show my point, let's look at this:

Sure it is. Absolutely. And I think it's far more complicated than public life allows the discussion for.

Unfortunately, abortion is a very simple moral issue. Whether one is for it or against it, no one produces complicated arguments for their position. Indeed, relatively few people even hold their position on abortion as the result of a chain of reasoning, but rather hold it as a first principle. The arguments really do run the gamut from, "It's a human life, therefore terminating it is subject to the same constraints as terminating any other human life. QED." to "It's not, therefore it's not. QED." to "It doesn't really affect me and life is complicated enough, so I really don't want to discuss it. QED." That last one is usually phrased more like "Abortion should be safe, legal, and rare.", though it's sometimes phrased, "I believe that the morality of abortion should be left up to each person to decide for themselves."

(Incidentally, while there are pro-abortion and pro-infanticide positions which I could support (e.g. the Roman pro-infanticide position which essentially boils down to "I brought you into this world so I can take you out again if I want to") — though I don't — I find the personal choice statement of the apathetic route absolutely fascinating. People very rarely say things this stupid in other venues. E.g. "I think that the morality of beating a woman to death should be left up to each person to decide for themselves" or "I believe that the morality of stealing cars is decision which should be left between a man and his priest". "I think that securities fraud is a serious moral transgression but I believe that each inside trader should decide this for himself." Indeed, one rarely hears calls for car theft to be "safe, legal, and rare" despite there being a fair number of people who are apparently in favor of it, seeing as how many of them do it.

I can understand that people really don't want to deal with divisive issues which don't affect them personally, but it really would be better if they just admitted their apathy instead of dressing it up as some sort of principled position. If the state is to be put in charge of any matters of morality — that is, if there is to be a state — the only principle under which it can operate is that all matters of morality which can be accurately judged by the state should be. There are many matters which can't — for example there's no good way (in general) to find out when people are lying (that wouldn't drag society to a halt), and even less of a good way to determine how severe their lie is and how it should be punished fairly. We must get on with the business of living, and give up the state making people tell the truth in all but very exceptional circumstances because it's not feasible to do otherwise. Even Soviet Russia, with its networks of spies, informants, and secret police, never aimed that high — they stopped short at the far more achievable goal of punishing all speech against the state — and they never did a very good job even at that.

Abortion is comparatively easy to determine, and admits of no greater variation in severity — if the thing is immoral at all — than murder does. And we all agree that the state is competent to prosecute murder.

No, these understandable people want to leave abortion to individual aborters not because the state can't deal with it, but because they don't want to have to figure out whether the state should.)

Continuing:

I mean, being for choice does not mean you are for abortion.

Being in favor of something never means that you want the accidentally certain results of it — people in favor of choice don't want abortion, people in favor of war don't want death, people in favor of property don't want poverty, people in favor of nations don't want war, people in favor of guns don't want people being shot, people in favor of cars don't want automotive fatalities (accidents). However, at some point we all do have to admit that we're comfortable accepting these results, and that in some sense we therefore don't think that they're so bad.

Being in favor of using the atomic bomb on Hiroshima does not mean that one is in favor of anything dying there, but it would be stupid to maintain that this somehow absolves you of enabling the foreseeable consequences. That Senator Kerry does not want abortions to happen does not remove whatever moral weight (if any) that hangs on him for all of the abortions that he has worked so hard to make possible (he has an extremely pro-choice record). In short, it's wonderful that he's only in favor of sweetness and light, but so am I, so is every man. The question is what comes when he tries to produce it.

I think that it's really a question of who should make this decision, and how do arrive at it.

Can he name any other issue of morality on which he believes this? Child pornography? Theft? Murder? Traffic violations? Parking Tickets? Could he name any other moral issue — grave or trivial — which the state could feasibly handle which should be left to individual judgement?

Oh, sure, there are all sorts of things which we don't consider immoral that we'll happily leave up to people who do to choose for themselves — sodomy and sexual promiscuity and eating pork and the use of modern medicines and so forth. Can he name something he thinks universally wrong, that the state could reasonably interfere with, that he wants the state to keep out of? Can anyone?

But there is morality.

Does this really mean anything at all? Even in context, this doesn't appear to be anything more than a general affirmation of the existence of morality.

Of course there's morality involved.

Now, this might mean something if it weren't followed by this sentence:

And we should be talking to people in America about responsibility, about adoption, about other choices.

A beautifully wishy-washy concept, whatever morality it is that's involved. Whatever it is, it's appeased by talking to people about other choices. What other importantly held moral beliefs does the senator hold which impose obligations which can be discharged merely by talking to people?

And I want to have a better conversation than I think we've had on it.

Imagine that! He's in favor of sweetness and light and cute puppies and apple pie! Who'd have thought?

But it doesn't change my position on who chooses. And I will protect that right of choice.

So, morality is involved, but not enough to matter.

Frankly, I think that Slate was doing him a favor by abbreviating his response so much. It would have been a bigger favor to leave the entire back-and-forth out entirely. I think that the fervently apathetic people on this issue can just safely assume that Kerry is safely non-committal and not need to be assured by him speaking out of both sides of his mouth that he doesn't intend to actually wake that sleeping dog.

Really, there's nothing more disgusting than strongly held moderation. Even evil is preferable to disdain for finding out whether a thing is good or evil. It's almost like finding a rock which is militant about its non-sentience. That a rock cannot find the truth because it cannot find anything is natural to a rock, but still a reason to pity the rock — or at least to be glad that one isn't the rock. When a man cannot find the truth, how on earth could he possibly be proud of this position?

Update: Yes, I was not in a happy mood when I wrote the above. I haven't read it again, but it's not in very temperate language. Anyhow, Frank J. said it better (and shorter) a while ago:

There is now a Centrist Coalition blog. I hate moderates... much more than even liberals. I bet Satan is a moderate; the best way to get evil accepted is to package it with some good. That's what moderates do; they're always like, "Oh! I'm so special because I don't take a firm stance on issues, and I see value in everyone's viewpoints." I bet right now a moderate is reading this and partially agreeing with it. Damn you!
Untitled
Posted by Beth on 2004-07-23 18:30:47 UTC. (permalink)

Fetish of the day: alt.binaries.images.underwater

I found it while googling for pictures of salamanders called sirens. (I name all my computers after aquatic salamanders; first hellbender, then mudpuppy, now siren)

()

Posted by Chris on 2004-07-23 12:08:55 UTC. (permalink)

Something just occurred to me in while I was in the shower:

The most important thing in philosophy is for a man to have the impudence to think himself an expert, or — better by far — the good sense to realize that all men are amateurs.
Now 73 more genitals
Posted by Beth on 2004-07-23 03:16:02 UTC. (permalink)

My freudian analysis according to a 30-second survey on the internet:

Genital (productivity)   |||||||||||||||||| 73%
Latency (learning)       |||||||||||| 	    43%
Phallic (sexuality)      ||||||||||||||     53%
Anal (self control)      ||||||||||||||     53%
Oral (dependence)        ||||||||||||||     56%

Oral: you appear to have a good balance of independence and interdependence.

Anal: you appear to have a good balance of self control and spontaneity.

Phallic: you appear to have a good balance of sexual awareness and sexual composure.

Latency: you appear to have a good balance of knowledge seeking and practicality.

Genital: you appear to have a progressive and constructive outlook on life.

It seems to say I'm doing alright. And since I read it on the internet, it must be true!

In other news, Teri got a kick-ass digital camera today.

()

r u smart
Posted by Beth on 2004-07-20 03:08:02 UTC. (permalink)

Chris asked me tonight if his aim account looks in any way like that of a stalkable young female. Not that I can see, I said. Apparently he's been IM'd out of the blue lately by people who insist they know him.


Me: I mean, are you sure that the person who contacted you several months ago was using the account TheServantOfAll?
Me: rather than something close to that?
Me: I simply mean that I don't believe that i am the person with whom you had spoken
Me: and if I am correct, and you would like to speak to that person, the sooner we get to the bottom of whether I am the person that you are seeking the more convenient for all involved
ComptonCrim: r u smart?
Me: may I ask to what purpose you ask that question?
ComptonCrim: ur useing big words

()

Taughannock again but wetter this time
Posted by Beth on 2004-07-18 05:57:37 UTC. (permalink)

This week it had been storming a lot. When we noticed the falls in all the little creeks gushing twice as much water as usual, we decided we should go up and check out Taughannock falls. I saw those falls with my parents not long ago, and while the falls were very tall, the water passing over them wasn't much more than a trickle (though of course a "trickle" at that scale is probably thousands of gallons a minute). Sure enough, Toughannock was very very wet.

the falls

First we stopped at the overlook. You drive up to a parking lot with some informational placards and bulletin boards, and a little walled-off area at a very nice vantage point. When you approach it, suddenly you see through the trees to a head-on view of a gigantic round canyon and in the middle of it, the very narrow river that carved it, dropping 215 feet down the cliff.

We were lucky enough to not be rained on while we visited. When we got there, a thick white fog was filling the valley and sitting over the parking lot. I snapped a few photos, and then after a short conversation with Teri, I looked up and noticed that the fog was almost gone.

We drove down to the trailhead below us, and walked toward the falls. The trail goes 3/4 of a mile and is big and flat and wide, suitable for a sunday stroll with your non-hiking-inclined relatives. On sunny weekends it's full of tourist-looking families in shorts and sunglasses. Today it was almost deserted, and the river was raging where two weeks ago people were walking with dogs on the dry parts of the riverbed.

When we reached the falls, it still wasn't raining, but man did we get wet. The enormous amount of water falling off the rocks threw up lots of water droplets, and created a wind to blow the water around. I would wipe off my lens on my shirt while waiting for the wind to die down, then lift up the camera and race to take a picture before too many water droplets hit the lens. By the time Teri and I left, we were soaked - and I was even wearing a raincoat.

()

An accidental closure in mod perl
Posted by Beth on 2004-07-15 14:48:35 UTC. (permalink)

(HAPPY BIRTHDAY CHRIS! HAPPY BIRTHDAY JOHN!) I thought I'd share a fun observation about mod_perl. Take this script:

#!/usr/bin/perl
use strict;

my $cgi = new CGI; # standard CGI line
my %params = $cgi->Vars; # just getting our input, nothing special

do_stuff();

sub do_stuff {
	print "Content-type: text/html\n\n$params{something}";
}

The important part is that we declare a variable (the hash %params) with 'my' (thus lexically scoping it) in the main body of the script; and then we use it some more in the subroutine do_stuff(). This is exactly the right thing to do if you're doing a CGI script, and it looks like it should be the right thing to do in a mod_perl script.

With a script similar to this, I was noticing that sometimes the output that was printed was from a previous request. Obviously mod_perl is caching something, but what and how? We're re-assigning to %params every time (the 'my' clears it out even if it has anything in it).

One of the tricky things about mod_perl - in fact, the one tricky thing that causes all the other tricky things - is that the perl interpreter keeps a copy of your script all the time, and when your script runs, it doesn't have a clean slate - it can reuse its old variables. This can provide a tremendous speedup, which is why it's used. So, in a sense, the entire apache process is running one great big perl script.

So, the subroutine kind of "knew" what the previous value of %params was. In fact, you could even say that the subroutine had lasting access to lexical variables defined outside its own scope. Why, it was almost like ... a closure!

A closure is a subroutine that "remembers" lexically scoped variables (which are initially declared outside of the subroutine) from one run to another. For example:

#!/usr/bin/perl

{
	my $foo = 0;

	sub increment_foo{
		$foo++;
		print "foo is now $foo\n";
	}
}

increment_foo();
increment_foo();
increment_foo();
increment_foo();

For more on what lexical scope means, check out Coping With Scoping. For more on closures, ask somebody who groks them (perldoc -q closure is *not* a good place to start, though it's an interesting tidbit to read after you learn what a closure is). There's some stuff on closures here.

(the solution to the mod_perl problem is to pass %params directly, as an argument to do_stuff; or to do the initial declaration as 'our %params' rather than 'my %params'.)

UPDATE: Added another set of curly braces in the second example code. LordFrith says that without an enclosing block, you're just fiddling with a global, because $foo never actually goes out of scope. OK, point taken. Note that instead of an empty block, you can have things like:

  • a different package (maybe your closure/function is in a module)
  • a function generator like in LordFrith's first comment (below)

()

Taughannock Falls
Posted by Beth on 2004-06-29 15:00:45 UTC. (permalink)

My parents came up to visit this weekend and I took them to some gorges - first Treman Park, which they thought was really neat, and then Taughannock Falls, the tallest waterfall around (compare its 215-foot drop to Niagara's piddly little 176 feet).

the falls - they're huuge
people

The barely visible orange and blue smudges in the lower left, standing on the ledge above the pool, are people (enlarged here). You're not actually supposed to swim here, because every now and then rocks the size of cars fall off.

There were some nifty informational placards, so to continue the geology lesson, the waterfalls are formed thusly:

Once upon a time, when rivers started flowing into Cayuga Lake (this is after the whole glaciers-carving-out-the-lakes thing), they flowed along a bed of limestone. Erosion caused chunks of limestone to break off near the lake. More erosion caused chunks to break off further back from the lake. At each place where a chunk broke off, the water level drops, and that's a waterfall.

There were pictures on these placards of what the falls looked like in 1895 - there was a lot more rock. The water used to flow over a diamond-shaped rock; in 1895ish it broke off, so that now the water flows over a V-shaped rock. Looking at the pictures, you can see a lot more places where rocks used to be, but aren't now.

()

Greetings from Ithaca
Posted by Beth on 2004-06-23 03:29:31 UTC. (permalink)

Today was my second day at work at my new job on Cornell. I'm doing bioinformatics at the Solanaceae Genomics Network.

I bought a booklet at the Cornell bookstore about the geology of Ithaca (titled, of course, Ithaca is Gorges. It's really interesting. What follows is my summary of what I read. I am not a geologist. Consult a real geologist before believing anything I say :)

A long long time ago in a place very very close, the area now known as New York was under an ocean and on the equator. The Appalachian mountains were taller than the Himalayas are now. As the Appalachians eroded, the sediment that came off the mountains became the source of all the sedimentary rock around Ithaca today. The coarser particles became sandstone; the finer particles got carried further away and became shale.

The water evaporated, leaving lots of salt deposits, and by the time the dinosaurs came around the area was dry land. There aren't any dinosaur fossils in New York, though, because they all eroded away and got scraped off by glaciers.

Glaciers actually came through the area a bunch of times, but we only really know about the last two or so times. Glaciers push sediment around, and they pushed sediment into walls that dammed up water and formed the Finger Lakes. The streams draining into them wore through the sedimentary rock, and millions of years later those streams are in deep gorges.

Waterfalls (at least some of them, including Taughannock Falls) are formed when the stream, eroding the rock below it, hits harder rock that doesn't wear away as quickly. The higher portion is harder rock that didn't get worn down.

Read more and see maps!

()

Untitled
Posted by Beth on 2004-06-19 17:29:25 UTC. (permalink)

()