KBD

Keith Devens .com

Friday, January 9, 2009 Flag waving
Je n'ai fait celle-ci plus longue que parce que je n'ai pas eu le loisir de la... – Blaise Pascal (Lettres Provinciales)

Archive: April 10, 2002

← April 09, 2002April 11, 2002 →

Daily link icon Wednesday, April 10, 2002

More StructuredText Fun

Ok, different types of ordered lists work now:

  • first,
  • regular
  • lists
  1. then
  2. plain
  3. ordered lists
    1. Arabic
    2. numbers (same as default)
      1. Lower
      2. alpha
        1. upper
        2. alpha
          1. lower
          2. roman
            1. upper
            2. roman

Nesting also works Smiley All of this could be a little more stylesheet friendly (I still use the old (and deprecated) "type" list attribute), but that'll come later. Nice thing about using the markup parser is that when I change the parser, all previous entries automatically change Smiley

Keep in mind that for all of this I'm not using one bit of HTML. There's not one "<" or ">" in this entire post except for the ones in this sentence Smiley

Oh, I almost forgot... images work now!

Heimlich! (From 'A Bug's Life' - great movie!)

America's real plan

Via lgf, a fantastic article from Amity Shlaes.

Even while thinking that our administration has held a double standard, while listening to Rush and Hannity call the Bush on this, and while thinking that our President had lost his clarity of purpose regarding terrorism, I'd always thought that there might be another plan in place. Our current administration is very smart (regardless of what anyone wants to believe about Bush) and I figured that even while calling for more talks we were really maneuvering behind the scenes.

Shlaes puts in words what I had been thinking. Rather than explain what she says badly, I'll end with some of her words:

Consider, first of all, Mr Bush's speech. In the days and weeks before it, indeed ever since suicide bombing took hold in Israel, America's European allies have been telling Washington it must work harder on brokering peace. The arrival of a heavyweight such as Secretary of State Colin Powell could show both sides that the US is serious and that Mr Sharon and Mr Arafat must take it seriously. Europe therefore views the speech as a recognition of this reality.

Not so the White House. It generated the speech to show other things. One is, indeed, that it respects its allies and will take their demands - dispatching Mr Powell - seriously. But another was to put an ultimatum before Mr Arafat. In effect, Mr Bush said: all right, we will send Mr Powell. But if Mr Arafat then continues to allow suicide bombers and other forms of violence to emanate from his territory, he will no longer be acceptable as a negotiating partner.

It is important to remember that negotiation has been tried over and again in the case of the Palestine Liberation Organisation and Israel. Following the Gulf war, the US spent close to a decade on the Oslo Accord. But the accord failed. Even after receiving the Nobel peace prize, Mr Arafat walked away from the peace offers made by Ehud Barak's government.

In short, the fundamental question about the US posture in the Middle East is: is America after talks or is it after action? The answer is action. In this view, calls for more talks - even the Pope's call for peace - appear outdated. Indeed, to many Americans, Europe seems to be in a dreamland over Iraq.

After all, the US tried negotiations and brokering before Mr Arafat walked away from the negotiating table almost two years ago, and again before September 11. The world saw then that this approach would not work.

An optimization anecdote

Via LtU, Guido van Rossum: Python Patterns - An Optimization Anecdote. A really good example of what goes on in higher level languages that you sometimes have to think about.

This is also a case of why strings are hard, a case of a Shlemiel The Painter algorithm, and an example of why you need to go back to basics. For all this, read Joel Spolsky's Back to Basics.

Continuing markup woes

Ok, I'm getting my markup under control Smiley Inline styles are fixed! The downside is that I'm having trouble trying to make a regular expression that wants this to be a hyperlink:

"sometext"="http://blah.com/"

The problem is, it'll match too much if there's a quoted string before one of those strings - it'll match from the beginning of the first quote to the end of the second quote. I need some way to say "match a quote, any text until you see another quote, a quote, an equals sign, a quote, and any text until you see another quote". Too late to explain in any more detail now. I'll leave you with the current regex I'm using:

/&quot;(.+?)&quot;[:=]&quot;(.+?)&quot;/=

You can tell that I'm doing HTML escaping before I do my matching Smiley To put it in terms of that, the first captured string is matching too much. Why?

By the way, the regex above works and is currently in use on my weblog. All the links you see are generated by it. Again, the only problem is that it sometimes matches too much, and I'm having trouble making the first captured string stop when it hits the first quote.

The most useful bookmarklets ever

Two of the most useful bookmarklets ever: from webgraphics, show divs and from Sam-I-Am, show tables.

R2D2 is the baddest mofo

Slashdot had a crappy poll asking who the 'coolest movie robot' was. They listed a bunch of robots I never heard of, but - hello? - they left out the Terminator, Johnny Five, and R2D2.

← April 09, 2002April 11, 2002 →
January 2009
SunMonTueWedThuFriSat
 123
45678910
11121314151617
18192021222324
25262728293031



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 3 posts

Recent comments XML

The Elegant Universe

Well I have finally found the crazy​guy that preaches useless nonsence​in A...

Joseph Baxter: Jan 7, 11:07pm

I hate Norton Antivirus


SYMANTEC is very​cunning..
Symantec now have a​redeemable cash back offe...

CAN: Jan 4, 6:25pm

Spider solitaire

Hi everyone!

Glad to have found​this site.  I have enjoyed reading​the c...

flwrchld53: Jan 4, 5:30pm

Generated in about 0.053s.

(Used 7 db queries)

mobile phone