Politics, Blame, use.perl, etc.

darobin on 2003-08-26T23:45:17

Those of you that follow my journal with even vague regularity will have noticed that many of the recent entries are short, mostly political, entries, and that there is little room for Perl, or even -- alas -- for proper answers to what comments are to be found there. I realize that this may not be considered appropriate by some, wish no quarrel with them, and will no doubt move my journal to some other place when time allows me to. However, there are varied assortments of reasons for this, and some of those follow.

First and least interesting is time. I post about what I notice most, have unfortunately very little time to address objections whether valid, invalid, interesting, or boring, and focus on pointing to other resources way much more than expressing my self. That being said, on to more interesting bits.

It is hard, even for people interested in politics as I am, to find right wing (some of you may prefer to say conservative) people to exchange views, even if briefly, with. Finding right wing people is easy. Finding ones that can articulate non-monosyllabic, in these parts, is hard. Beyond "welfare is evil", "all arabs are terrorists", or "you will burn in hell because you don't believe in <insert favourite fictitious entity>" there is little to be found in terms of "proper" right wing thought around Paris. Even though the current French government is from the right, I could easily pick any right wing economist and roast their actions to silliness. So having two or three right wing people that can finish a sentence without drooling close by is very interesting -- and tempting even when it may be considered off-topic. As a side-note, I realize that some of you may take offense at the equating of religion and right-wingedness that I express above. Simply please keep in mind that that is what I am given to see here. And at the very least, that those that are religious and remotely sane here would refuse in any way -- and probably fight in every way, possibly more than atheists -- any political leader engaging in something he calls a "crusade". And all things considered, unless you want Islam eradicated, for good reason.

So I find value in the opposition. Even when given, as recently, some arguments that I will in all understanding of the weight of words decidedly call delirious -- namely the idea that global warming may not happen, or if it does it is not proven that it is due to CO2 -- the difference is of interest. That particular argument is of course a special case since it is about as valid as the non-incidence of smoking on lung cancer defended by some cigarette companies (hey, it's been shown that over 40% of people that die from lung cancer have cats...), the centrality of the Earth in the Universe, or Elvis' abduction by aliens. It is of value because it is telling when even smart, educated, often science-loving people put forth such claims. And I am sure that they could find such "telling" things in my discourse, because precisely they are smart and educated and all, and we all have our blind spots.

So the take-away thing is, not taking into account the vanilla (is that the right expression?) stuff about understanding other cultures, that the opportunity to talk to people that disagree and can articulate it is interesting because any political belief requires blind spots, and theirs aren't the same ones.

Different cultures? Yes. I'm sure many that were (foolish|courageous) enough to read this far has pretty much pictured "those others" as Americans. Judging from the comments, they indeed seem to be, even if that is not my specific target at all. But do Americans count as a totally different culture from, say, the French? Even from, say, a french guy that writes better English overall than French, is half-Australian, and sometimes shows off his EU passport? Yes. I've lived in the US, and the single worst mistake to make if you're European is to think that it's the same culture, or even one as closely related as european cultures are to one another. It's not that there's that huge a gap, it's just that there are cultural faux-amis. The movies you've seen, the familiar languag, the politics you've at least heard about, and of course the clichés bandied about in many places trick you into behaving as if understanding the american culture was almost a given when really it is not. The false familiarity works as a wall whereas when confronted with a culture perceived as perhaps more "alien" one will make conscious efforts to understand.

Monstrous? Hmmm, tsssst. Yes, I've been accused of calling the Americans "monstrous" (hi jordan!). Was it deserved? I don't think so, at least I hope not. In my experience, it certainly is not true, far from it. What I will gladly admit to is calling the Bush administration monstrous, or rather I wouldn't since that's not a word I use I and think they're worse than that, but yes I'd use much worse words for them. The comparison of Bushists and Bathists is one that has come up before, and I am not foolish enough to put them in the same bag. The Bathist are worse. But by a matter of degree more than one of essence, both being on the same wrong side of the line [having voted for Bush, or being a "Republican", doesn't make one, in this argument, a Bushist. Thinking that Iraqi WMDs could kill more people than the pollution of industrial countries, and rejecting the Kyoto Treaty and at least part of the war in Iraq -- today -- does]. I do confess to not understanding the lack of social unrest in the US when several young Americans are killed almost daily for government lies (ok pudge, very very unproven statements). If democracy is the reason, which it wasn't until late, why is Afghanistan such a terrible mess today, with talibans still owning much of the place? (you'll note .af was a NATO intervention for large parts, and that I'm not talking about countries that weren't on the radar for that fairly short period of time). There were reasons to go to Iraq, why not change Chapter 7 for that sort of situation as has been discussed repeatedly over the past decade? Oh, and don't tell me terrorism has anything to do with it, please.

Ah well, I've diatribed for a while if I may say so. And not on Perl. If you don't like it say so. If you like it but not here say so. Either way Perl bloody rocks, as it exemplified itself to me today when I could write a program that deduced an XML Schema from a large bunch of XML documents in under thirty minutes :) If you do answer, think twice about your bias and mine. And please be patient, as I don't often find the conjunction of sleeplessness, a my girlfriend's computer, time, and the wish to write a little thing down...


It IS About the Science

pudge on 2003-08-26T23:57:19

Look, we have just over 100 years of good data on weather patterns. The Earth has been around for, what, billions of years? And we think that just because it is hot now, that it is the hottest summer on record, that we didn't have a hotter summer 500 years ago? Maybe a period of 20 years of increased heat in the 1500s? We can only assume we didn't. That's not good science.

Re:It IS About the Science

rafael on 2003-08-27T13:09:37

AFAIK the study of ice at poles and at higher mountains gives good hints about the wheather for the last few dozens of centuries.

Re:It IS About the Science

darobin on 2003-08-27T13:28:22

Yes, it does. In my hometown of Grenoble there's one of the more advanced glaciology research centers. We have super-high precision weather direct measures for the 20th century, and less precise for part of the 19th, but we also have very precise indirect data extracted from glaciers and ice caps for more than the past 500 years, and less precise (though I hear it's getting better) for many centuries back. Tree cuts also give information on weather as old as the tree, which can be several centuries old. And the data is better than hints really.

We also have history to inform us that summers this hot aren't on record in France. All droughts, inundations, and marking meteorological events were consigned in writing in much of Europe for the past twenty five centuries. It would seem that the last really hot and dry summer preceded by a terribly cold winter (as this year) was in the 1780s (and is believed to have helped the revolutionary climate through starvation, etc) and can be linked to the terrible eruption of the Laki volcano in Iceland. See for instance http://www-geology.ucdavis.edu/user/GEL115/volcs2.html and scroll down to "THE LARGEST BIG BANG‹TAMBORA 1815". You can clearly see how the effects run worldwide for a major volcanic eruption. It's an accepted explanation, there is enough corelation.

Pollution releases way more same and similar gases into the atmosphere. Permanently.

Re:It IS About the Science

darobin on 2003-08-27T13:33:08

There are a few small errors above, written too fast, sorry 'bout that. I just wanted to add that the rest of the article is worth reading to see how climate can be directly affected. Volcanoes are very interesting because they show abrupt changes in the chemical composition of the atmosphere, and provide good data on how global warming operates.

Re:It IS About the Science

pudge on 2003-08-27T13:47:16

Yes, that is what I meant to imply by my use of the phrase "good data." We do have hints. But nothing of the level of -- to use darobin's comparison -- the wide array of hard data that we have for a study of smoking vs. lung cancer.

Re:It IS About the Science

mary.poppins on 2003-09-06T02:01:12

The trouble with running a climate experiment is that we can only run it once.
Hopefully we will like the outcome: by the time we have hard data, it will be
very difficult to do anything about it.

Re:It IS About the Science

pudge on 2003-09-06T07:10:08

And it is for this reason that I support many efforts to curb pollution. However, it doesn't make it acceptable, to me, to state as fact that cars are destroying the ozone layer, or whatever.

Re:It IS About the Science

mary.poppins on 2003-09-06T19:31:27

If one adopts an empirical (as opposed to religious) worldview, then nothing is
ever certain -- everything is open for refutation by new information. At the
same time, though, it is always clear to one which theories are "really really
probably" the case. Many of use like to call these theories "facts." Exactly
where the cutoff is between a "theory" and a "fact" varies from person to person
(Is evolution via natural selection a "fact", or just a "theory" supported by
lots of evidence? How about string theory? Or gravity?).

In the case of climate change, there is much suggestive evidence, and plausible
mechanisms to explain the evidence. Put that together with the difficulty in
getting good data, and the difficulty in fixing climate problems once we know we
have them, and I think it warrants precautionary action. Of course, there are
lots of people with huge piles of money out spreading disinformation about this
(e.g. envirotruth). I'm just a little pseudonym, so people may not pay much
attention to me. :)

It is also my theory that the changes to our society required to avoid climate
change (or further nuclear proliferation leading to use of nuclear weapons, or
terrible water shortages, or several other looming problems) are too large to be
achieved within the current organization of society. Lobbying your
Representative, writing a letter to Chevron, buying "green power", and so on,
won't get you very far.

Re:It IS About the Science

pudge on 2003-09-06T21:36:34

At the same time, though, it is always clear to one which theories are "really really probably" the case. Many of use like to call these theories "facts."

Sloppy people or poor scientists, yes. OK, I am being a bit facetious, I suppose, but I refuse to call something a fact unless I am absolutely convinced of it. YMMV.

However, this is all fine and good, but it has nothing to do with the subject, because in no sense is it '"really really probably" the case' that CO2 emissions are causing global warming. It really really isn't. We do not know. We do not have strong evidence.

It is also my theory that the changes to our society required to avoid climate change

You say this as if you know what CAUSES climate change. You don't. It is just as likely -- if not moreso -- caused by non-man-made phenomena as it is caused by man, by all the available evidence. We simply do not know. And you are one of us.

Re:It IS About the Science

mary.poppins on 2003-09-07T00:23:15

>> At the same time, though, it is always clear to one which theories are
>> "really really probably" the case. Many of use like to call these theories
>> "facts."
>
> Sloppy people or poor scientists, yes. OK, I am being a bit facetious, I
> suppose, but I refuse to call something a fact unless I am absolutely
> convinced of it. YMMV.

I think we're on the same page. What some call a "respect for reality."

> However, this is all fine and good, but it has nothing to do with the subject,
> because in no sense is it '"really really probably" the case' that CO2
> emissions are causing global warming. It really really isn't. We do not know.
> We do not have strong evidence.

The papers I've read on the subject sound pretty alarming to me, anyway. Of
course, I'm no expert on the subject -- but from what I can tell, people who
are, are concerned. Note that I haven't taken into account what the owners of
coal and oil companies say, because I don't think their opinions are
trustworthy.

> You say this as if you know what CAUSES climate change. You don't. It is just
> as likely -- if not moreso -- caused by non-man-made phenomena as it is caused
> by man, by all the available evidence. We simply do not know. And you are one
> of us.

(I did say it was my theory, BTW)

If human activity isn't changing the climate now, it very well might do so
eventually. The scale of human-caused changes to natural systems is really
amazing, and only getting bigger. These systems *are* resilient, but they also
are way to complicated to predict, and have many stable states. I don't want to
see it nudged into a state which sucks for humans.

I think an important question is where the burden of proof lies. Should we all
think things are fine unless they are proven bad? Or should we be more careful?

Re:It IS About the Science

jjohn on 2003-09-06T00:57:21

Isn't this "climate" versus "weather" confusion? From the freshman Earth Science class I took (so it must be true), Climate refers to "a weather trend through a long period of time." While I believe you are dead-on right to bring up the rather patchy daily weather record available to science today, it is a lot of climate data to be obtain through ice cores, rock layers and things of an imperical nature with which I'm not well acquainted (real science is hard and frequently dirty). Two questions must be answered as a prelude to debating environmental policy. Is the Earth's climate changing (over some given period of time)? Is climate change influenced by man's industrial and argicultural output? I think the answer to the first question isn't quite settled, but it does appear that climate has become hotter this century and will likely continue to get hotter during the next century. Is the "hand of man" the sole or deciding factor of this change (given that it exists)? There is far less conclusive evidence for man's contribution to climatic change than to even the existence of said climate change.

That said, we really ought to castrate industrial polluters. =-)

War

pudge on 2003-08-27T00:26:53

I do confess to not understanding the lack of social unrest in the US when several young Americans are killed almost daily for government lies.

Maybe this will help: even assuming everything that is said about lies by Bush is true, about lack of NBC weapons, about al Qaeda, etc., to me, and many other people, it doesn't matter, because that never had anything to do with why I favored military action against Iraq's government.

Go back and look. I was skeptical about the actual existence of NBC weapons, and I never talked about direct links to terrorists, because I didn't care. What I emphasized was that Iraq was cited, unanimously, to be a threat by the UN Security Council, to be guilty of breaching its cease-fire obligations, and that full cooperation was required of Iraq, and that Iraq for months refused to cooperate fully, and that therefore -- after 12 years of trying -- the line was finally drawn and force was warranted.

You don't have to agree with those reasons. I expect you won't. But none of that was lied about, and to me, and many others, it was always the most important thing. You think of this as "dying for government lies," when the war was, to many people, justified on things NO ONE contends were lies.

I today read a Brian Eno piece in TorgoX's journal where Eno says no one cared about Iraq before last summer, and it suddenly became important. Well, I don't know who he hangs out with, but I have viewed Iraq as a serious threat to regional stability -- as has the UN Security Council -- for many years, and was hoping Bush might push the UN to take action since long before "Axis of Evil" or September 11 came up. For people who follow security in the Middle East, Iraq has always been an issue on the table, and abot one UN Security Council resolution per year, since 1991, has focused on the rogue nation.

That's what the war with Iraq is really about. The stuff about terrorism was, at worst, a way to get more people behind the effort, because saying "regional security" is a tougher sell, presumably. But in retrospect, it probably would have gone better for Bush to go that way, which is what I was saying back in January.

Re:War

ziggy on 2003-08-28T16:02:40

Citing breach of security council resolutions is a straw man. The US wanted to depose Sadaam Hussein, and the decade of noncompliance with the security council was a convenient justification, not a casus belli.

As TeeJay will no doubt point out, other nations are not in compliance with UN resolutions or UN Security Council resolutions. Israel comes to mind, yet there's no US intervention on the scale that we have seen in Iraq. And let's not forget about the politics going on inside the UN -- the resolutions that weren't voted on because of certain veto by the security council, or resolutions that were vetoed due to one political agenda or another.

Sorry, I'm not read up on specific instances, but we both know that this happens in the UN just like every other bureaucracy. For the most part, the UN is a mere shadow of what it was intended to become, and security council resolutions are empty pieces of paper.

Except when they can be cited as justification for military action.

Re:War

pudge on 2003-08-28T16:17:54

Citing breach of security council resolutions is a straw man. The US wanted to depose Sadaam Hussein, and the decade of noncompliance with the security council was a convenient justification, not a casus belli.

You misunderstand what I am saying. Yes, the purpose of the war was to eliminate the threat of Hussein, but so was the purpose of the resolutions. The point is that because the resolutions failed to effect the desired result, further action was required (cf. clause 34 of Resolution 687 (1991)).

As TeeJay will no doubt point out, other nations are not in compliance with UN resolutions or UN Security Council resolutions.

Not in ANY of those resolutions against other nations did the UN Security Council promise to take "further steps" to "secure peace and security in the area" (Res. 687) or threaten "serious consequences" (Res. 1441).

The phrasing in 687 there is especially interesting because it is a actual promise to do what is necessary to secure peace and security, which necessarily means that, as a last resort, force will be used (because without the threat of force, no such promise could be worth anything). Note that Iraq, Kuwait, and the rest of the UN Security Council (hm, maybe except for one of the Middle Eastern nations on it at the time, if my memory is any good) agreed to this promise of force.

Anyway, the point is not that they violated the resolutions -- that this in itself is a crime -- but that the resolutions were there to effect a certain outcome, and that because they failed to do that, force was used to achieve it (as promised in the original cease-fire resolution in 1991). I am sorry I didn't make it clear in the last post.

I like it

jdavidb on 2003-08-27T03:11:29

I like it, and I like it here. Because, you see, it's so hard to get a good left-winger who can be articulate about his views.... :P

Seriously; I appreciate your presence and hope you'll choose to stay. I like the strange, freakish mix of Perl, politics, and personal lives that is use Perl;.

Elvis &amp; our beneficent insectiod alien rulers

TorgoX on 2003-08-27T06:19:37

Don't you doubt for one minute that Elvis is alive and controlling Earth's galactic future!!! He is ALIVE and I have the CROP CIRCLES and "MISSING TIME" to prove it!!

P.S., good luck finding the least glimmer of intelligent discourse in the French media. Altho I always hope that I will turn around and see that it has changed, the French media is the horrible evil twin of the US media -- in the US media, people have learned to hoot and gibber baboons. In the French media, baboons have learned to talk like (like) civilized people.

I hear the Belgian media is very slightly better.

You're probably better off asking people on the street (or street people) what they think.

And when you're done doing that...

[OT] Warning: Perl content

htoug on 2003-08-27T08:16:45

write a program that deduced an XML Schema from a large bunch of XML documents in under thirty minutes :)

Could you extract the central ideas of that and possibly upload it as a module. I am forced to use XML-Schema at work, and would love to have more perl tools for it.
Yes I know that it is a mess. To quote Andy Wardley:
My conclusion, after spending nearly 6 months working on it, is that it is an utter bastard of a specification written by a committee of Java XML product vendors. 200+ pages of twisted specification(s) that attempts to account for anything that the committee could think they might want to add to their fancy products but wouldn't have a clue how to implement.
But any help would be better than none.

As a side note, I must confess that I enjoy the flame wars^Warguments^Wdiscussions your viewpoints conjure up; please do continue here.

Re:[OT] Warning: Perl content

Dom2 on 2003-08-27T09:09:12

Heh, XML Schema reminds me of a quote I found the other day somewhere on Peter Gutmans home page. It was talking about SSL and PKI:
The X509 specification was invented by the ecommerce department of the ministry of silly walks

I get the impression that XML Schema was designed in much the same manner...

-Dom

Re:[OT] Warning: Perl content

darobin on 2003-08-27T09:49:42

It's not at all CPAN worthy. It currently only deals with a single namespace, and has some stuff hardwired for SVG (I needed the schema that is just enough to describe a bunch of SVG documents, not the complete one). Adding multinamespace support shouldn't be too hard, though the loops in the data structures will get a bit twisted. Here is the code, raw. It may help you in some ways, you never know, all help is good when it comes to XML Schema ;) If you don't understand the data structure which I know is hairy, turn DEBUG on and it'll dump it. Dumped, it becomes a lot clearer. This is a quick and dirty hack, all disclaimers apply.

Andy's view on XML Schema is right, I know, I've taken part in an implementation... Thank $DEITY for <ecode>.

# simple schema generator

use strict;
use XML::SAX::ParserFactory;
use Data::Dumper;

use constant DEBUG => 0;

# conf
my @overrideFiles = qw();

# list files
my $dir = '.';
opendir DIR, $dir or die "Can't open $dir";
my @files = grep /\.xml$/, readdir DIR;
closedir DIR;

# process that
my %info;
my $p = XML::SAX::ParserFactory->parser( Handler => SchemaGenerator->new(\%info) );
@files = @overrideFiles ? @overrideFiles : @files;
for my $f (@files) {
    eval {
        $p->parse_uri($f);
    };
    print "Error: '$@' in document '$f'\n" if $@;
}

print Dumper(\%info) if DEBUG;

# generate the schema
my $cnt = 0;
my $elements;
for my $ns (keys %{$info{EltOccurs}}) { # for each ns
    open my $sch, ">schema$cnt.xsd" or die "Couldn't open schema$cnt.xsd: $!";
    for my $el (keys %{$info{EltOccurs}->{$ns}}) { # for each element
        my $hasCM = scalar keys %{$info{EltContains}->{$ns}->{$el}->{$ns}};
        my $hasTxt = $info{EltText}->{$ns}->{$el} ? " mixed='true'" : '';

        # we need to deal with text here
        $elements .= "  <element name='$el'$hasTxt>\n    <complexType>\n";
        $elements .= "      <choice minOccurs='0' maxOccurs='unbounded'>\n" if $hasCM;
        # elements (we don't do multins right now)
        #for my $ref (keys %{$info{EltContains}->{$ns}}) {
        for my $ref (keys %{$info{EltContains}->{$ns}->{$el}->{$ns}}) {
            $elements .= "        <element ref='svg:$ref'/>\n";
        }
        $elements .= "      </choice>\n" if $hasCM;

        # attributes
        for my $attr (keys %{$info{AttrOccurs}->{$ns}->{$el}->{''}}) {
            next if $attr eq 'xmlns';
            $elements .= "      <attribute name='$attr' type='string'/>\n";
        }
        $elements .= "    </complexType>\n  </element>\n\n";
    }

    # we don't do multiNS
    print $sch <<"    EOXSD";
<schema
        targetNamespace='$ns'
        xmlns='http://www.w3.org/2001/XMLSchema'
        xmlns:xsd='http://www.w3.org/2001/XMLSchema'
        xmlns:svg='$ns'
        elementFormDefault='qualified'
        >

    EOXSD

    print $sch $elements;
    print $sch "</schema>\n";
    close $sch;
}

# handler
package SchemaGenerator;

sub new {
    my $class = shift;
    my $info  = shift;

    my %self;
    $self{info} = $info;
    $self{ctx}  = [];
    return bless \%self, $class;
}

sub start_element {
    my $self = shift;
    my $el   = shift;

    my $ctx  = $self->{ctx};
    my $info = $self->{info};
    if (@$ctx) {
        $info->{EltContains}->{$ctx->[-1][0]}->{$ctx->[-1][1]}
                            ->{$el->{NamespaceURI}}->{$el->{LocalName}}++;
    }
    $info->{EltOccurs}->{$el->{NamespaceURI}}->{$el->{LocalName}}++;

    for my $attr (values %{$el->{Attributes}}) {
        $info->{AttrOccurs}
             ->{$el->{NamespaceURI}}->{$el->{LocalName}}
             ->{$attr->{NamespaceURI}}->{$attr->{LocalName}}++;
    }

    push @{$self->{ctx}}, [ $el->{NamespaceURI}, $el->{LocalName} ];
}

sub end_element {
    pop @{$_[0]->{ctx}};
}

sub characters {
    my $self = shift;
    my $data = shift->{Data};
    return unless $data =~ m/\S/;

    my $ctx = $self->{ctx};
    $self->{info}->{EltText}->{$ctx->[-1][0]}->{$ctx->[-1][1]}++;
}

Do stay

gtod on 2003-08-27T09:23:44

I don't keep a journal here but I read other people's most days - and really enjoy seeing yours. I hope you don't have to move elsewhere - Perl or no Perl.

On another note - I'm entirely Australian but have lived in the UK for 3 years. Love to buy you a bottle of wine next time we're in Paris.

You should stay here and talk...

BooK on 2003-08-28T13:13:26

... cause Perl content is so boring. ;-)

Anyway, I'm still not sure if I'm more right wing (the last presidential election shouldn't count ;-)) or left, or somewhere in the middle (you know, takes the good ideas where they are, and try to put them in practice), or just plainly bored by politics. Sometimes I do not agree with your views and sometimes I do, but they are very often interesting, and I like to read them. Here.

survey says: keep on blogging

jjohn on 2003-09-06T01:12:55

Darobin,

I hope that you continue to blog here as long as you find it amusing to do so. There are many blogs that have nothing at all to do with Perl or programming (personally don't go out of my way to read the technical entries). There will be those that will shout you down for your opinions, but that is the price of free speech. Your observation that opposition is valuable to healthy debate has been keenly validated by the 2002-2003 political scene in the US, which was dominated by a small but vocal group of ideologs. However, even the most radical opinions have a place in the public forum, if for no other reason than show the spectrum of possibilities every issue engenders. One thinks of the famous ACLU case in the 1970s in which a Jewish lawyer successfully defended the Ku Klux Klan's right to hold a parade.

Blogging consumes your most valuable resource: time. Continue here as long as you feel that you have invested that commodity wisely.