Archive for May, 2006

McAllister on FSF

McAllister’s attack on the FSF is both poorly thought and largely crying foul against an organization that is publicly objecting to market practices- one of the few to do so consistently and with an eye to the actual implications that technology and state intervention in technology can have.

While pointing out that the defectivebydesign.org caries some hyperbole, McAllister goes down the opposite road to argue an ill-informed libertarian perspective:

Emblazoned across the demonstration’s home page is the alarming statement, “There is no more important cause for freedom than the call for action to stop DRM from crippling our digital future.”

Sure. And if you buy that one, I’ve got a bridge to sell you that stretches from North Korea to the Sudan.

For starters, market realities right here in the United States put the lie to the FSF’s histrionics. Apple’s iTunes Store, which sells DRM-encoded music and videos to millions of iPod owners, is going like gangbusters. Clearly, despite DRM’s widely discussed inadequacies and regular aggravations, more than a few consumers are willing to put up with it when the price is right. That’s just basic free-market economics.

Here, McAllister does the classic move to conjoin “free market” with “freedom”. Secondarily, he doesn’t seem to realize that DRM is actually a market regulation- it prevents market activity. Even if McAllister’s freemarket position is accepted (which it shouldn’t be), the idea that DRM helps freemarkets is a misunderstanding of capitalism. Ironcially, while Apple’s iTunes does use DRM, it’s also one of the least restrictive DRM schemes, something that McAllister fails to note.

Of course, McAlliser’s bad thinking doesn’t stop there- he goes on to push that FSF is making moral arguments, completely missing the realities of DRM:

In this new worldview, DRM is Wrong. It is verboten. And who knows what other algorithm or subroutine might be cast out next; but who are we to question? By abandoning social and economic arguments in favor of a moral one, the FSF is in effect telling us that God is on its side.

FSF has been rather clear about why DRM is wrong and why it is an important issue to address. If anything they understand the social (and even economic) arguments vastly better than McAllister does. To quote Stallman from an interview on DRM briefly:

AACS, the “Advanced Access Content System,” promoted by Disney, IBM (IBM), Microsoft (MSFT), Intel (INTC), Sony (SNE), and others, aims to restrict use of HDTV recordings–and software–so they can’t be used except as these companies permit. Sony was caught last year installing a “rootkit” into millions of people’s computers, and not telling them how to remove it. Sony has learned its lesson: it will install the “rootkit” in your computer before you get it, and you won’t be able to remove it. This plan explicitly requires devices to be “robust”–meaning you cannot change them. Its implementors will surely want to include GPL-covered software, trampling freedom No. 1. This scheme should get “AACSed,” and a boycott of HD DVD and Blu-ray has already been announced (http://bluraysucks.com/boycott).

It’s rather clear that DRM has much larger implications that McAllister is willing to acknowledge. Given the realities of how DRM actually works and what corporations and governments can do with the data and restrictions it creates, McAllister’s article is pretty much just FUD crying FUD

Free Software Foundation: Free as in “do what I say” By Neil McAllister

Comments

Drupal Newsroom Module

I just wrote this module to make it easier to make a listing page of specific content types filtered by taxonomy terms. It’s a bit simpler than the taxonomy browser and allows the admin better control over what users can and can’t do.

It also supports nice urls, where the url to access the public side of the module is http://yoursite.com/newsroom/1 where 1 is the taxonomy term you’d like to show.

This allows an admin to:
1) select the content types that are displayed
2) set the number of items per page
3) set the no results message
4) set a default taxonomy term to use if none are passed

This is 4.7 only.

you can download here.

Comments (2)

G4 1.5ghz 12″ vs Mac Book

Here’s a direct comparison between the 12″ 1.5ghz g4 powerbook and the new Mac Book. As can be pretty clearly seen, the Mac Book is really a significant step up- given that the g4 is more than two years old at this point and has a single processor, one ought to expect this, but the difference between the two machines is pretty impressive. In many cases the difference is more than double.

I ran these tests just after login. Quicksilver and Dragthing were running on both. Hopefully neither tried to sync during the tests. Oh mysql and apache were also probably running at the same time.

The heat is the major question on the Mac Book. While I’ve yet to see any posts about the thermal past on it, it feels hotter than the memory of the first 867mhz g4 12″ that I had.

Check out the stats of the Mac Book running Rossetta. It still manages to keep the lead on the G4.

G4 1.5ghz

Geekbench Information
  Version:                Geekbench Preview 3 (build 78)
  Compiler:               GCC 4.0.1 (Apple Computer, Inc. build 5250)
  Platform:               Mac OS X PPC

System Information
  OS:                     Mac OS X 10.4.6 (Build 8I127)
  Model:                  PowerBook G4 (12-inch 1.5 GHz)
  Motherboard:            PowerBook6,8
  CPU:                    PowerPC G4 (7450)
  CPU ID:                 18, 11
  CPU Count (Logical):    1
  CPU Count (Physical):   1
  CPU Frequency:          1499 MHz
  Bus Frequency:          166 MHz
  Memory:                 1280 MB

CPU Integer Performance
  Emulate 6502
    scalar, 1 thread       71 (rate: 1.0, result: 136.3 MHz)
    scalar, 4 threads      71 (rate: 1.0, result: 135.6 MHz)
  Blowfish
    scalar, 1 thread      132 (rate: 1.0, result: 54.37 MB/sec)
    scalar, 4 threads     132 (rate: 1.0, result: 54.3 MB/sec)
  bzip2 Compress
    scalar, 1 thread      103 (rate: 1.0, result: 16.07 MB/sec)
    scalar, 4 threads     100 (rate: 0.9, result: 15.18 MB/sec)
  bzip2 Decompress
    scalar, 1 thread       73 (rate: 1.0, result: 26.63 MB/sec)
    scalar, 4 threads      72 (rate: 1.0, result: 26.41 MB/sec)

CPU Floating Point Performance
  Mandelbrot
    scalar, 1 thread       68 (rate: 1.0, result: 482.2 Mflops)
    scalar, 4 threads      68 (rate: 1.0, result: 479.8 Mflops)
  Dot Product
    scalar, 1 thread      154 (rate: 1.0, result: 228.2 Mflops)
    scalar, 4 threads     157 (rate: 1.0, result: 227.8 Mflops)
    vector, 1 thread      185 (rate: 11.4, result: 2.611 Gflops)
    vector, 4 threads     185 (rate: 11.8, result: 2.686 Gflops)
  JPEG Compress
    scalar, 1 thread      118 (rate: 1.0, result: 10.4 Mpixels/sec)
    scalar, 4 threads     119 (rate: 1.0, result: 10.46 Mpixels/sec)
  JPEG Decompress
    scalar, 1 thread       85 (rate: 1.0, result: 14.83 Mpixels/sec)
    scalar, 4 threads      84 (rate: 1.0, result: 14.57 Mpixels/sec)

Memory Performance
  Read Sequential
    scalar, 1 thread       29 (rate: 1.0, result: 367.3 MB/sec)
    scalar, 4 threads      29 (rate: 1.0, result: 364.5 MB/sec)
  Write Sequential
    scalar, 1 thread       78 (rate: 1.0, result: 626 MB/sec)
    scalar, 4 threads      77 (rate: 1.0, result: 596.5 MB/sec)
  Stdlib Allocate
    scalar, 1 thread       85 (rate: 1.0, result: 3.119 Mallocs/sec)
    scalar, 4 threads      92 (rate: 1.1, result: 3.412 Mallocs/sec)
  Stdlib Write
    scalar, 1 thread       28 (rate: 1.0, result: 698.8 MB/sec)
    scalar, 4 threads      28 (rate: 0.9, result: 618.6 MB/sec)
  Stdlib Copy
    scalar, 1 thread       34 (rate: 1.0, result: 428.1 MB/sec)
    scalar, 4 threads      36 (rate: 0.9, result: 391.2 MB/sec)

Stream Performance
  Stream Copy
    scalar, 1 thread       35 (rate: 1.0, result: 451 MB/sec)
    scalar, 4 threads      33 (rate: 1.0, result: 458.6 MB/sec)
    vector, 1 thread       36 (rate: 1.0, result: 464.4 MB/sec)
    vector, 4 threads      34 (rate: 1.0, result: 460.4 MB/sec)
  Stream Scale
    scalar, 1 thread       38 (rate: 1.0, result: 453.2 MB/sec)
    scalar, 4 threads      38 (rate: 1.0, result: 451.7 MB/sec)
    vector, 1 thread       34 (rate: 1.0, result: 465.7 MB/sec)
    vector, 4 threads      33 (rate: 1.0, result: 468 MB/sec)
  Stream Add
    scalar, 1 thread       15 (rate: 1.0, result: 195.5 MB/sec)
    scalar, 4 threads      26 (rate: 1.8, result: 360.4 MB/sec)
    vector, 1 thread       28 (rate: 2.1, result: 402.8 MB/sec)
    vector, 4 threads      32 (rate: 2.5, result: 483.3 MB/sec)
  Stream Triad
    scalar, 1 thread       15 (rate: 1.0, result: 195.4 MB/sec)
    scalar, 4 threads      26 (rate: 1.8, result: 359.7 MB/sec)
    vector, 1 thread       34 (rate: 3.0, result: 592 MB/sec)
    vector, 4 threads      31 (rate: 3.0, result: 589 MB/sec)

Mac Book 2.0ghz

Geekbench Information
  Version:                Geekbench Preview 3 (build 78)
  Compiler:               GCC 4.0.1 (Apple Computer, Inc. build 5250)
  Platform:               Mac OS X x86

System Information
  OS:                     Mac OS X 10.4.6 (Build 8I2025)
  Model:                  MacBook1,1
  Motherboard:            MacBook1,1
  CPU:                    Genuine Intel(R) CPU           T2500  @ 2.00GHz
  CPU ID:                 GenuineIntel Family 6 Model 14 Stepping 8
  CPU Count (Logical):    2
  CPU Count (Physical):   2
  CPU Frequency:          2000 MHz
  Bus Frequency:          664 MHz
  Memory:                 2048 MB

CPU Integer Performance
  Emulate 6502
    scalar, 1 thread       88 (rate: 1.0, result: 169.5 MHz)
    scalar, 4 threads     178 (rate: 2.0, result: 337.4 MHz)
  Blowfish
    scalar, 1 thread      162 (rate: 1.0, result: 66.87 MB/sec)
    scalar, 4 threads     323 (rate: 2.0, result: 133 MB/sec)
  bzip2 Compress
    scalar, 1 thread      148 (rate: 1.0, result: 22.99 MB/sec)
    scalar, 4 threads     294 (rate: 1.9, result: 44.77 MB/sec)
  bzip2 Decompress
    scalar, 1 thread      137 (rate: 1.0, result: 50.3 MB/sec)
    scalar, 4 threads     269 (rate: 2.0, result: 99.06 MB/sec)

CPU Floating Point Performance
  Mandelbrot
    scalar, 1 thread      140 (rate: 1.0, result: 988.3 Mflops)
    scalar, 4 threads     278 (rate: 2.0, result: 1.967 Gflops)
  Dot Product
    scalar, 1 thread      256 (rate: 1.0, result: 378.2 Mflops)
    scalar, 4 threads     544 (rate: 2.1, result: 788.5 Mflops)
    vector, 1 thread      101 (rate: 3.8, result: 1.423 Gflops)
    vector, 4 threads     154 (rate: 5.9, result: 2.233 Gflops)
  JPEG Compress
    scalar, 1 thread      116 (rate: 1.0, result: 10.25 Mpixels/sec)
    scalar, 4 threads     231 (rate: 2.0, result: 20.38 Mpixels/sec)
  JPEG Decompress
    scalar, 1 thread       96 (rate: 1.0, result: 16.76 Mpixels/sec)
    scalar, 4 threads     187 (rate: 1.9, result: 32.44 Mpixels/sec)

Memory Performance
  Read Sequential
    scalar, 1 thread      176 (rate: 1.0, result: 2.193 GB/sec)
    scalar, 4 threads     169 (rate: 1.0, result: 2.105 GB/sec)
  Write Sequential
    scalar, 1 thread      216 (rate: 1.0, result: 1.692 GB/sec)
    scalar, 4 threads     209 (rate: 0.9, result: 1.588 GB/sec)
  Stdlib Allocate
    scalar, 1 thread      183 (rate: 1.0, result: 6.698 Mallocs/sec)
    scalar, 4 threads      53 (rate: 0.3, result: 1.97 Mallocs/sec)
  Stdlib Write
    scalar, 1 thread      109 (rate: 1.0, result: 2.632 GB/sec)
    scalar, 4 threads     128 (rate: 1.1, result: 2.766 GB/sec)
  Stdlib Copy
    scalar, 1 thread      178 (rate: 1.0, result: 2.186 GB/sec)
    scalar, 4 threads     174 (rate: 0.8, result: 1.834 GB/sec)

Stream Performance
  Stream Copy
    scalar, 1 thread      160 (rate: 1.0, result: 2.04 GB/sec)
    scalar, 4 threads     169 (rate: 1.1, result: 2.27 GB/sec)
    vector, 1 thread      170 (rate: 1.0, result: 2.129 GB/sec)
    vector, 4 threads     171 (rate: 1.1, result: 2.285 GB/sec)
  Stream Scale
    scalar, 1 thread      175 (rate: 1.0, result: 2.044 GB/sec)
    scalar, 4 threads     194 (rate: 1.1, result: 2.277 GB/sec)
    vector, 1 thread      152 (rate: 1.0, result: 2.026 GB/sec)
    vector, 4 threads     167 (rate: 1.1, result: 2.292 GB/sec)
  Stream Add
    scalar, 1 thread      115 (rate: 1.0, result: 1.498 GB/sec)
    scalar, 4 threads     184 (rate: 1.7, result: 2.527 GB/sec)
    vector, 1 thread      166 (rate: 1.6, result: 2.357 GB/sec)
    vector, 4 threads     182 (rate: 1.8, result: 2.677 GB/sec)
  Stream Triad
    scalar, 1 thread      142 (rate: 1.0, result: 1.814 GB/sec)
    scalar, 4 threads     189 (rate: 1.4, result: 2.537 GB/sec)
    vector, 1 thread      135 (rate: 1.3, result: 2.304 GB/sec)
    vector, 4 threads     144 (rate: 1.5, result: 2.651 GB/sec)

Mac Book Rosetta

Geekbench Information
  Version:                Geekbench Preview 3 (build 78)
  Compiler:               GCC 4.0.1 (Apple Computer, Inc. build 5250)
  Platform:               Mac OS X PPC

System Information
  OS:                     Mac OS X 10.4.6 (Build 8I2025)
  Model:                  Rosetta
  Motherboard:            PowerMac
  CPU:                    PowerPC G4 (7400)
  CPU ID:                 18, 10
  CPU Count (Logical):    2
  CPU Count (Physical):   2
  CPU Frequency:          2000 MHz
  Bus Frequency:          664 MHz
  Memory:                 2048 MB

CPU Integer Performance
  Emulate 6502
    scalar, 1 thread       78 (rate: 1.0, result: 150.3 MHz)
    scalar, 4 threads     158 (rate: 2.0, result: 300.3 MHz)
  Blowfish
    scalar, 1 thread       79 (rate: 1.0, result: 32.69 MB/sec)
    scalar, 4 threads     159 (rate: 2.0, result: 65.55 MB/sec)
  bzip2 Compress
    scalar, 1 thread       57 (rate: 1.0, result: 8.904 MB/sec)
    scalar, 4 threads     152 (rate: 2.6, result: 23.17 MB/sec)
  bzip2 Decompress
    scalar, 1 thread       67 (rate: 1.0, result: 24.66 MB/sec)
    scalar, 4 threads     142 (rate: 2.1, result: 52.12 MB/sec)

CPU Floating Point Performance
  Mandelbrot
    scalar, 1 thread       73 (rate: 1.0, result: 517 Mflops)
    scalar, 4 threads     146 (rate: 2.0, result: 1.029 Gflops)
  Dot Product
    scalar, 1 thread       63 (rate: 1.0, result: 92.69 Mflops)
    scalar, 4 threads      61 (rate: 1.0, result: 88.08 Mflops)
    vector, 1 thread       23 (rate: 3.6, result: 330.8 Mflops)
    vector, 4 threads      49 (rate: 7.7, result: 717 Mflops)
  JPEG Compress
    scalar, 1 thread       73 (rate: 1.0, result: 6.429 Mpixels/sec)
    scalar, 4 threads     152 (rate: 2.1, result: 13.36 Mpixels/sec)
  JPEG Decompress
    scalar, 1 thread       66 (rate: 1.0, result: 11.48 Mpixels/sec)
    scalar, 4 threads     130 (rate: 2.0, result: 22.54 Mpixels/sec)

Memory Performance
  Read Sequential
    scalar, 1 thread       76 (rate: 1.0, result: 972 MB/sec)
    scalar, 4 threads      24 (rate: 0.3, result: 301.6 MB/sec)
  Write Sequential
    scalar, 1 thread      168 (rate: 1.0, result: 1.314 GB/sec)
    scalar, 4 threads     204 (rate: 1.2, result: 1.549 GB/sec)
  Stdlib Allocate
    scalar, 1 thread       44 (rate: 1.0, result: 1.6 Mallocs/sec)
    scalar, 4 threads      23 (rate: 0.5, result: 838.1 Kallocs/sec)
  Stdlib Write
    scalar, 1 thread       98 (rate: 1.0, result: 2.365 GB/sec)
    scalar, 4 threads     127 (rate: 1.2, result: 2.736 GB/sec)
  Stdlib Copy
    scalar, 1 thread      144 (rate: 1.0, result: 1.769 GB/sec)
    scalar, 4 threads     160 (rate: 1.0, result: 1.687 GB/sec)

Stream Performance
  Stream Copy
    scalar, 1 thread       84 (rate: 1.0, result: 1.071 GB/sec)
    scalar, 4 threads     155 (rate: 1.9, result: 2.084 GB/sec)
    vector, 1 thread      120 (rate: 1.4, result: 1.504 GB/sec)
    vector, 4 threads     167 (rate: 2.1, result: 2.235 GB/sec)
  Stream Scale
    scalar, 1 thread       49 (rate: 1.0, result: 579.7 MB/sec)
    scalar, 4 threads      96 (rate: 2.0, result: 1.125 GB/sec)
    vector, 1 thread      114 (rate: 2.7, result: 1.529 GB/sec)
    vector, 4 threads     163 (rate: 3.9, result: 2.232 GB/sec)
  Stream Add
    scalar, 1 thread       48 (rate: 1.0, result: 641.9 MB/sec)
    scalar, 4 threads     107 (rate: 2.3, result: 1.467 GB/sec)
    vector, 1 thread      123 (rate: 2.8, result: 1.755 GB/sec)
    vector, 4 threads     176 (rate: 4.1, result: 2.585 GB/sec)
  Stream Triad
    scalar, 1 thread       49 (rate: 1.0, result: 635.9 MB/sec)
    scalar, 4 threads      92 (rate: 2.0, result: 1.231 GB/sec)
    vector, 1 thread      106 (rate: 2.9, result: 1.821 GB/sec)
    vector, 4 threads     177 (rate: 5.3, result: 3.275 GB/sec)

Comments

layout_block module

Updated: latest module version, improved module design

I put together a module for a theme that I’m working on which gives more flexibility to the layout of blocks. The theme itself is a flexible multi column layout, so the blocks can be defined to 1-5 columns. Eventually I’ll start doing some hooks for other content types as well so that an entire theme can be multi column.

The module installs easily. Customization relies on CSS and images. Basically this module gives the following three options to blocks:

1) control how many columns a block takes up
2) control what icon goes with a block
3) control what background a block has

It assumes that you have these things in place. It comes with some css and a set of icons. It does allow you to set a path to a directory of icons and then it will make those available to the admin.

You can add this blocks programatic aspects to block.tpl.php with this code:

$cols = variable_get('layout_block-'. $block->module .'_'. $block->delta, '1');

$icon = variable_get('layout_block-'. $block->module .'_'. $block->delta . '_icon', 'icon-member.gif');

$background = variable_get('layout_block-'. $block->module .'_'. $block->delta . '_background', 'solid_white');

In the module itself, I have an array of options for the block classes. These are tied to the CSS file, so if you want to use different class names, you can modify these pieces.

$background_select = array(
'solid_white' => t('Solid white background'),
'gradient_1' => t('Light gradient'),
'gradient_2' => t('Medium gradient'),
'gradient_3' => t('Dark gradient'),
'solid_1' => t('Light solid'),
'solid_2' => t('Light med solid'),
'solid_3' => t('Medium solid'),
'solid_4' => t('Medium dark solid'),
'solid_5' => t('Dark solid')
);

This ends up building a class definition for blocks like this:

$block_class = "block_" . $background . "_" . $cols . "col";

My blocks look like this:
<div class="<?php print $block_class; ?>">
<div class="block_header">
<img src="<?php print $base_path . path_to_theme(); ?>/pieces/icons/<?php print $icon; ?>" height="23" width="23" align="left" />
<h1 class="block_header_title"><?php print $block->subject; ?></h1>
</div>
<div class="block_body">
<?php print $block->content; ?>
</div>
<div class="block_footer"> </div>
</div>

The CSS for these blocks is not well abstracted yet, but here’s an example:
/* solid 1, 1col */
.block_solid_1_1col {
background-image: url('pieces/block/middle/1-s1.gif');
background-position: top;
background-repeat: repeat-y;
margin-bottom: 9px;
margin-right: 9px;
width: 145px;
}

.block_solid_1_1col .block_header{
background-image: url('pieces/block/header/1-blockhead.gif');
}

.block_solid_1_1col .block_footer{
background-image: url('pieces/block/bottom/1-s1.gif');
}

Here’s what the admin interface looks like:

Download the module

Comments (2)

Guest Pass Patch

Working on Guest Patch and ran into an error in send.inc (line 455). The problem is that _guestpass_send_invite isn’t sending back an array. This patch fixes that.

warning: array_merge() [function.array-merge]: Argument #2 is not an array in modules/contrib/send/send.inc on line 455.

You can download it here.

Comments

pinky the cat

This is absolutely amazing. Beware pinky.

If only we knew where pinky was now.

See: pinkythecat.net

Comments

Freespeech vs Advertising: Negativland’s Mark Hosler on Copyright

After watching this interview, I have to say that I’m surprised that the differentiation that Hosler is drawing out is based on free vs. paid speech. He essentially makes the case for free use of any material with the exception of advertising which ultimately looks rather like a liberal version of free speech. I’m pretty sure that this distinction is actually artificial- where does the line between advertisement and non-advertisement begin and end? One could look at the Spice Girls as an advertisement for Pepsi (or themselves), or the licensing of material for advertising (think of the Army’s use of Godsmack’s songs for recruiting). Both of these instances are more complex than simply using material for advertising, yet both express a reality of how music is actually used. The question could ultimately be pushed in to a corner by asking if any art which exists as a commodity could ever not be advertising?

See: Minnesota Stories: Daily Videoblog: Negativland’s Mark Hosler on Copyright

Comments

« Previous entries