KBD

Keith Devens .com

Friday, November 21, 2008 Flag waving
Premature abstraction is an equally grevious sin as premature optimization. – me

Archive: May 22, 2002

← May 21, 2002May 23, 2002 →

Daily link icon Wednesday, May 22, 2002

What a way to wake up

Is this safe? Maybe this is just what I need? Nah.

Britney on Buffy

Via Xkot.net, Britney Spears is going to be on 6 episodes of Buffy next season. That's awful.

Pop star Britney Spears is set for a role in Buffy the Vampire Slayer [and] is planning to take on the part of a blood-sucking baddie, according to reports.
She will star opposite Sarah Michelle Gellar for six episodes in the show's next season.

Just when I was thinking next season couldn't possibly be any worse than this one just was.

Hey, look, next year might be the last season for Buffy.

Google Sets

Google sets is AMAZING. I gave it the name of my town and one of the towns next to us, and it gave me a list of what seems like every town in Bergen County.

Found via Slashdot.

HTML question

I've never quite understood this. In HTML, if you just have:

 1: <html>
 2: <head>
 3: <title>This is some sample code on my weblog!</title>
 4: </head>
 5: <body>
 6: plain text straight in the body
 7: 
 8: <p>Paragraph text</p>
 9: 
10: plain text straight in the body again
11: 
12: <!-- sorry to put all these extra lines.
13:   I'm just having fun with my markup parser's
14:   new code markup facilities :) -->

15: </body>
16: </html>

How are the plain text areas of the body evaluated. I know exactly how they're understood in terms of CSS - each of the paragraphs gets an "anonymous box" to be used for layout. However, does HTML consider text that's not in a paragraph to be a paragraph, or what? Since HTML is supposed to do semantic markup, what does text that's not in a table, blockquote, list, or paragraph (etc.) mean?.

StructuredText philosophies

I was just thinking about the philosophy with which a StructuredText implementation will interpret content, and discovered that there are actually three different ways.

  • First, you can have the way mine currently does. Strictly line based. You have context, so if the last line was a list item and this line was a list item, they're both part of the same list. Multiple lines are part of the same paragraph, multiple table rows are part of the same table, etc.
  • You can have one like reStructuredText that is certainly not line based. Multiple lines in a paragraph block automatically wrap, you can have rowspans in a table (by making tables really really complicated Smiley), etc. Indentation determines what block or what element the current content is part of.
  • You can have a mix - one that is primarily line based, but allows some multiline constructs. This is the mix I'd like to eventually achieve.

Think about it in terms of e-mail. If have a paragraph in an e-mail message that looks like

line 1
line 2
line 3

The first two parsers will necessarily render it differently, but the third has to make a decision. The first (like mine) will consider each line a new line, but all part of the same paragraph. The second (like reStructuredText) will wrap each line as part of the same paragraph. In other words, it will join the lines together and you'll wind up with "line 1 line 2 line 3".

This results in two problems. Number one, your paragraphs don't retain the same structure. If you put line breaks, they don't stay. This would wreak havoc with poetry or prose, and wouldn't reflect the actual look of an e-mail, for instance. I'm looking at the reStructuredText "test document" right now and I can't see if they even provide a way to put line breaks within a paragraph.

This is why when you see Zope wiki (ZWiki) pages (which use the old incarnation of StructuredText), or reStructuredText pages, you tend to have a lot of extra blank lines between things. List items usually have blank lines, multiple lines in a paragraph are double spaced, etc. This is because they consider everything to be a paragraph, and must allow for multiple paragraphs.

My goal is to strike a good balance. I'd like to make lines be lines (not be joined together), but also allow multiple lines in list items, blockquotes, and tables. I think I'm almost there even. Version 1.0 of my parser will still be purely line based, but from then on I'm going to try to get that balance Smiley

Manjara

Neat search engine at Yale.

Dave's Weblog Envy

Via Scripting News: I must admit, this collapsable weblog is very cool. It takes Mark Pilgrim's outline style and goes one further. Oh look, it was actually inspired by Mark's site Smiley

Questions on Islam

Via LGF, Questions on Islam by Balamurali K. Ambati.

As an amateur student of religions, I studied and discussed the Quran with Muslim friends, and must question certain verses, in good faith, without rancor or ill-will, for exchange enables comprehending and moving beyond them, by illuminating the motivational framework of Islamic fundamentalism.

Good questions. Most importantly, read the article for the quotes from the Koran, which I haven't quoted here.

I disagree with some of his commentary on a philosophical level of course, that ethics can somehow be separated from religion. His call to Muslims to ignore those verses in the Koran that violate the modern sensibilities of the west is silly and philosophically naive. Once you start picking and choosing, it's not really Islam anymore, it's something else. And to ignore parts of the Koran would be inconsistent with believing that it was divinely received, etc. So it's really not that simple.

Opera 6.02

Opera 6.02 has been released. I don't believe that they've fixed all the memory management bugs that have plagued it in the past, so I'm not even going to try it.

Perl 6 Answers

Over at use Perl;, Perl 6 Answers:

You asked, they answered. You meaning those posting questions on last week's article, and they meaning Larry Wall and Damian Conway (with a bit of help from Dan, Jeff, Hugo, and Nat).

When I saw "last week's article" last week, I told myself I'd wait until the answers were given to post anything about it. Here it is! Smiley

These changes are all part of a drive to make regexes much more readable. A major goal for Perl 6 is to break backward compatibility in the areas that need it, and no area needs it more than regular expression syntax. So prepare yourselves for a certain amount of future shock when you read Apocalypse 5, because we're going to propose a radical re-design of regex metacharacters. We think you'll like it. Eventually.

Sounds good to me.

Ooh, best part of it is the answer to the question about Perl 6's design goals:

1. Throw out the prototype, just this once. We've maintained backward compatibility through 15 years of evolution, and it shows. ... We've decided to take a leap of faith and assume that we can translate Perl 5 to Perl 6. Given that assumption, or presumption, we've chosen to really and truly redesign everything based what we've learned from the prototype, both good and bad. We want to keep everything that leads to joy, and leave behind everything that leads to grief. We want to design "the perfect language".

"There's More Than One Way To Do It" does not mean there should ten ways to do it. Somewhere between two or three ways is generally the right fractal dimension to aim for.

We constantly have to keep in mind why natural languages are good at what they're good at. And to never forget that Perl is a human language first, and a computer language second. The temptation is to pretend that a language is a work of art. But it isn't; it's an artistic medium, to be used for good or ill by the artist. We need to allow precision, but also allow imprecision, because both are useful. And never for a moment allow ourselves to think that the Perl language is more important than the Perl culture. A language without a culture is dead.

So many great quotes I can't quote them all, so read the thing yourself.

Aaah, I can't stop - so funny: "To what change are YOU most looking forward?" -> "Damian: Good Damian is most looking forward to declaratively specified, properly encapsulated OO; Evil Damian is most looking forward to the user-reprogrammable source parser." Smiley

PHP image gallery script

Via the Hosting Matters forums, http://gallery.sourceforge.net/ looks like a pretty neat script. Something for me to keep in mind if I ever need anything like it.

Review of A New Kind of Science

Review of A New Kind of Science at Slashdot.

← May 21, 2002May 23, 2002 →
November 2008
SunMonTueWedThuFriSat
 1
2345678
9101112131415
16171819202122
23242526272829
30 



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

Recent comments XML

new⇒Calif. Supreme Court to take up gay marriage ban

I would argue the point is not​definitional.  While the word​marriage is su...

Justin: Nov 20, 4:37pm

Java join function

Meh, don't have null strings in​your string arrays imo, but you're​welcome ...

Keith: Nov 19, 7:51pm

Girls, please don't get breast implants

sorry but another thing i have to​make a comment on about you​men...the men...

happynow: Nov 17, 11:36pm

Books by Vincent Cheung

to all Cheung​fans:

read:

http://www.progin​osko.com/aquascum/cheung.h...

Zamir: Nov 16, 9:07am

Spider solitaire

To undo or not to undo that is the​question.
I'm an undoer. 
My dad​was n...

Can Turk: Nov 15, 2:50pm

Generated in about 0.064s.

(Used 7 db queries)

mobile phone