KBD

Keith Devens .com

Tuesday, December 2, 2008 Flag waving
Although at the beginning the paradigm was worth consideration, now the entire effort in the primeval soup paradigm is self-... – Hubert P. Yockey (Information Theory and Molecular Biology, p336)
← Dive Into GreasemonkeyCondi Rice fails history →

Daily link icon Wednesday, May 11, 2005

Duff's device

I was just reading through this page on JavaScript Optimization (via Keith) and came across Duff's device for the first time (Jargon file). I'm surprised I hadn't come across it before. But, doesn't it do the wrong thing if you want to loop zero times? Update: yep, and there's a note to that effect that I missed.

← Dive Into GreasemonkeyCondi Rice fails history →

Comments XML gif

Adam V. (http://adamv.com) wrote:

One of the first lines in the explanation, in the original do{}while is "(Obviously, this fails if the count is zero.)"

∴ Adam V. | 11-May-2005 1:05am est | http://adamv.com | #7627

Keith (http://keithdevens.com/) wrote:

Ah, missed that, thanks.

Keith | 11-May-2005 1:18am est | http://keithdevens.com/ | #7628

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

December 2008
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



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

Recent comments XML

new⇒Perl 6 1.0 in March?

Doh, my mistake. I'm aware of the​relation between Parrot and Rakudo​but I'...

Keith: Dec 2, 1:03am

Free image hosting sites

Well, TinyPic has this in its​FAQ:

> Images and videos is in​your accoun...

Keith: Dec 1, 1:13am

Join a NameValueCollection into a querystring in C#

Well with a lamba expression, this​is what I came up​with:

?!code:csharp...

Gustaf Lindqvist: Nov 30, 4:38pm

Why no generic OrderedDictionary?

Check​http://www.codeproject.com/KB/recip​es/GenericOrderedDictionary.aspx?d...

Gabrielk: Nov 27, 6:57am

WhatIsMyIP.com

http://www.thesysteminfo.com is​another good alternate to​whatismp.com... I...

Kripz: Nov 26, 8:51pm

Girls, please don't get breast implants

Actually I think it's sweet when a​man loves a woman whether she's big​or n...

218.186.12.228: Nov 26, 9:40am

Generated in about 0.203s.

(Used 8 db queries)

mobile phone