Computers: June 2006 Archives

YAPC Slides

| | Comments (0)
I need to make sure I put the word "sux" in my slides for YAPC.

use.perl.org

Mac-Carbon-0.76 Released

| | Comments (0)
Mac-Carbon-0.76 has been released. Download it from the CPAN or SF.net.

(Note: it may take time for the release to propagate to the various download mirrors.)
Changes:

* v0.76, 21 June 2006
 
   Add Intel-specific docs to Mac::Carbon manpage (no Intel-specific code
   changes in this release)
 
   Fix some AppleEvents tests due to incompatible Test::More versions, and
   Mac OS X 10.3 differences in AEBuild/AEPrint
 
   Fix AppleEvents event sending test for cases where current user does not
   have permissions (by default, they will not run: set MAC_CARBON_GUI=1 in
   environment to run all tests)
 
   Fix Speech test for Cepstral voices
 
   Fix docs for Mac::Components::GetComponentInfo()
 
   Fix MacPerl::Ask() for case where returned string is empty, fix test too
 
   Other Mac::Carbon manpage cleanup

Posted using release by brian d foy. use.perl.org

Mac-Glue-1.26 Released

| | Comments (0)
Mac-Glue-1.26 has been released. Download it from the CPAN or SF.net.

(Note: it may take time for the release to propagate to the various download mirrors.)
Changes:

* v1.26, Monday, June 19, 2006
 
   Small endian fix for Intel (you must upgrade to Mac-Carbon-0.75 if using
   Intel).
 
   Add app_process() method to return the application_process object from
   System Events (convenience method).
 
   Some fixes for more accurate type resolution.
 
   Improved documentation and eliminated a spurious warning.

Posted using release by brian d foy. use.perl.org
OK, I've uploaded Mac-Carbon-0.75 to the CPAN. Go play with it, if you have an Intel Mac. Let me know if you find anything wrong, and let me know soon, since I have less than a week left with this Intel Mac.

A new Mac::Glue release is following. It is currently broken on Intel, too. use.perl.org

Mac-Carbon-0.75 Released

| | Comments (0)
Mac-Carbon-0.75 has been released. Download it from the CPAN or SF.net.

(Note: it may take time for the release to propagate to the various download mirrors.)

Changes:

* v0.75, 19 June 2006
 
   Endian fixes for Intel Macs:
       * ReadHex() for parsing GUSI FSSpec
       * Lots of OSType fixes: global (in typemap), MacPerl, AppleEvents,
         Components, InternetConfig
       * Some test files that made bad assumptions
 
   Clean up a bunch of tests, better document what is incomplete
 
   Other AppleEvent fixes:
       * Clean up some docs
       * Clean up AEDesc->get, make AEKeyDesc->get an alias to same
       * Add AEKeyDesc->desc (get underlying AEDesc)
       * Add AEDesc->dispose and AEKeyDesc->dispose
       * Add thousands of new tests
 
   Remove a GetAliasInfo() test that no longer works, on UFS or on Intel
 
   Document MacPerl::Choose as unimplemented in Carbon
 
   Add some more Mac::Memory tests
 
   Make Mac::Processes::LSFindApplicationForInfo() properly return
   undef on failure
 
   Add typeProperty to Mac::Types
 
   Add $BASEDIR for building modules outside the base directory, but using the
   same headers etc.

Posted using release by brian d foy. use.perl.org
If the U.S. wins on Thursday, and so does Italy, then the U.S. goes to the second round of the World Cup (the U.S. could also advance with some other situations, but this is the simplest; the one thing for sure is the U.S. needs a win). If this happens, the U.S. will likely play on Tuesday at 10 a.m. Chicago time.

The question is, of course, do I skip YAPC to watch? The sessions during that time are Learning Perl 6 (sorry brian and Randal), Intro to Catalyst (sorry jibsheet), Catalyst-based software, Solstice Framework, web testing, web testing with Selenium, Module::Compile (sorry Ingy), and maintaining CPAN modules.

Suggestions are welcome, as are solicitations for companionship in front of a TV at a nearby pub, hotel lobby, etc.

And, of course, it's all moot if the U.S. doesn't advance. use.perl.org

Mac::AppleEvents Porting

| | Comments (0)
I totally think I finished porting Mac::AppleEvents. I didn't write every test I could -- there's always more that can be tested -- but I am confident the things left untested aren't endian issues.

The tests did uncover a bunch of bugs, some endian, and some not. Over 2500 tests, mostly just testing creating AEDescs, including lists (arrays) and records (hashes), but also making object specifier records (I didn't bother creating other kinds of records, like logical, range, comparison, and so on ... if one works, they all should ... right? :-), and, of course, creating and sending actual Apple events.

I also test each kind of method of creating AEDescs, lists, records, and events, and of adding parameters to events.

For the curious:

PowerBook G4 1GHz:  Files=2, Tests=2543, 12 wallclock secs ( 2.14 cusr +  0.26 csys =  2.40 CPU)
Intel mini 1.66GHz: Files=2, Tests=2543,  3 wallclock secs ( 0.67 cusr +  0.08 csys =  0.75 CPU)

I am going to take tomorrow off (it's my day, after all), and then attack the rest of the modules with a vengeance on Monday night. As noted before, Mac::AppleEvents uses a lot of other modules, and all the other Mac-Carbon tests pass, so I think I am in good shape. The other modules all had decent test suites before, with pretty much the whole API being tested, at least somewhat, for most of them. use.perl.org

Lies! Apple is full of lies!

| | Comments (0)

An Apple tech note says:

The AEBuild* suite of routines provide simple to use and easy to maintain facilities for constructing complex Apple event structures in memory for sending information to other applications. AEPrint provides a symmetrical pretty printer routine for viewing complex Apple event structures as strings formatted using the same syntax as the strings AEBuild* is able to read.

And later, more explicitly:

When AEPrintDescToHandle is asked to print an AEDesc, an AERecord, or an AEDescList, then the format of the printed output will match the input expected by AEBuildDesc.

Similarly, in the API docs, Apple says:

AEPrintDescToHandle prints the contents of AEDesc, AERecord, and AEDescList descriptors in a format that is suitable for input to AEBuildDesc. AEPrintDescToHandle also attempts display coerced Apple event records as the coerced record type instead of as the original type. Any data structures that cannot be identified are displayed as hexadecimal data.

Don't be fooled, though. It's a pack of lies.

I was writing some tests and took this at its word, thinking I could just make slight modifications to the AEPrint output. Indeed, however, if you feed AEPrint output back intp AEBuild, it will fail, because the AEPrint output is broken severely.

In just one simple test with an object descriptor record, it's easy to see some of the problems:

print AEPrint(AEBuild(q['obj '{ 'want':type(prop), 'name':'prop', 'from':'null'(), 'seld':type(sdsk) }]));
# <- 'obj '{ 'want':type(prop), 'name':'prop', 'from':'null'(),   'seld':type(sdsk) }
# -> 'obj '{ 'want':'prop',     'name':'prop', 'from':''null''(), 'seld':'sdsk' }

The first thing to notice is the difference between type(prop) and prop. By default, the string would be taken as an enum (as the docs note), so it is coerced to a type in the former. But according to AEPrint's output, those are enums, not types. That's a run-time error. Similar too for type(sdsk). So while AEPrint "attempts (to) display coerced Apple event records as the coerced record type instead of the original type," it fails.

The other thing which is just crazy is the double-single-quotes around null. That's a compile-time syntax error (which is helpfully placed in $@, as: Expected "," or "}" at character 53).

There's probably more, as my tests are pretty inexhaustive. One more thing to note, though: AEPrint will truncate binary data (rendered in hex, such as ($DEADBEEF$)) if it gets too long, so it's one more reason you can't just feed back the AEPrint output to AEBuild.

I also can't find out how floats are supposed to be passed in. The docs say I can do float(@) and pass in the float as an argument (AEBuild works sorta like sprintf), but that doesn't seem to work. Nor does passing integers in as arguments (such as long(@)), although for those, I can include it literally in the format string, instead of passing it in as an argument.

But, as those problems having nothing to do with the Intel port, it's time to move on, for now. use.perl.org
Only a week left to finish this, and I am almost done with Mac::AppleEvents. Several modules left to do, but this one should be, by far, the biggest. I've written about 1500 tests for it, and have some more left to do, and the tests have helped uncover a few more bugs.

I am alternating between "I'll never finish in time!" and "I'm almost done, this will be easy to finish!" I hope to finish Mac::AppleEvents Saturday night, though, and then I can reevaluate what's left to do. Really, I've only looked closely at the MacPerl module and this one, but all the other tests pass, for the other modules, so I am hoping I really can't find much else to fix. use.perl.org

YAPC and OSCON

| | Comments (0)
O'Reilly is making more room for Perl talks at OSCON (hooray!), and I will therefore have the opportunity to present my talk on Porting Mac::Carbon to Intel at OSCON as well as YAPC.

http://www.yapcchicago.org/the-schedule/tuesday/t-abstracts#et1525

http://conferences.oreillynet.com/cs/os2006/view/e_sess/8506

See you there.

use.perl.org

Brad's and Angelina's Baby

| | Comments (0)
I've heard this is the prettiest baby ever. So I went and bought the People magazine with the pictures of her. People spent $4 million on the pictures, and frankly ... well, I don't want to be cruel, but I've seen a lot of babies, and I think People got screwed. This has to be the ugliest baby I've ever seen. We're talking coyote ugly here. I guess they can afford plastic surgery, but man, she's gonna have a tough life being that deformed. use.perl.org

Cleaning Up

| | Comments (0)
In the past few weeks, I've made a lot of room on my PowerBook's 60-but-really-55 GB hard drive.

First, I removed old fink stuff from /sw. I kept bin, etc, include, lib, sbin, share, var. But I removed the fink and src subdirectories, which was together about 1.1GB. I also removed fink from my environment; I'll give it a month or two to make sure I don't need it, then delete the rest (and maybe move anything I do need to /usr/local first). That will get me another 1.25GB.

Next, I added an external hard drive to my home studio, 160GB. I pretty much will do my music and video production in that room, so I can move a lot of files to that drive.

First, I moved all my music files for Logic and GarageBand over there, about 4GB worth.

Then I moved my Apple Loops, over 6GB worth. In the process, I discovered "Apple Loops for GarageBand" were installed in two different locations, in /Library/Application Support/GarageBand/ and /Library/Audio/, to the tune of 1GB. I also had some loops in ~/Library/Audio/. I consolidated all these loops into one folder in the external drive, deleted the loops index files, and then reimported them into GarageBand, where I was prompted to leave them there or copy them. I left them there, it created my new index files, and all was well.

Then I did similar things with other GB and Logic files. GB instruments take up 2.1 GB; Logic's samples (instruments, drums, and reverbs) take up 4.2GB. I could not find a way to tell Logic and GB to look elsewhere, so I just made symlinks. I also moved the GarageBand Demo Songs, 400MB.

Finally, I put the iDVD themes (also in /Library/Application Support/) to the drive, and told iDVD in its prefs to look there for my themes. 1.7GB.

Along the way, I also removed things like the iWork and iDVD tutorials, for another half-GB or so.

So we're talking about 20GB saved, off a 55GB drive. Not too shabby. Now time to fill it up again!

use.perl.org

Re: Rock bottom

| | Comments (0)
Sometimes the haters are just comically funny, as in the article TorgoX points to by Sidney Bluemnthal (former Clinton advisor ... surprise!).

The thesis of the article, and the reason TorgoX linked to it, is regarding some supposed Bush violations of the Constitution.

Blumenthal lists three examples. All of them are incorrect.

First, he says, Bush is threatening to prosecute the NY Times for printing a story. Funny thing is, that this never happened. Gonzalez was asked if they would be prosecuted, and he said that is a possibility, given the language of the statutes. That's hardly a threat; indeed, Gonzalez explicitly said he would say no more than that it was legally permissable, which is a plainly true statement.

Nothing in the First Amendment has ever been construed by the Court to give journalists blanket right to publish anything they want to, without legal consequence, and there are many laws on the books that hold journalists liable for certain statements. The most well-known example is libel, and the most Constitutionally prominent is treason. Indeed, courts themselves put legally binding gag orders on journalists.

This is hardly a Constitutional crisis: Congress made the law, and the law says what Gonzalez says it says. If the Congress doesn't like it, they can change it, and if the Court finds it to be unconstitutional (which they've not yet done, in almost 100 years), they can do so. The executive branch, which only prosecutes under the law, is the least of the three responsible for this law, and to blame Bush for it is just incredibly daft.

But it gets better. Blumenthal says that the if Cheney refuses to honor a subpoena to testify in the Libby trial, that this would be some sort of Constitutional crisis. The problem is that the elected executives -- that would be Bush and Cheney -- are not outside the law, or above it, but regardless cannot be forced to be involved in a criminal proceeding.

This is longstanding principle that everyone agrees with, including Blumenthal who, recognizing this principle, argued that Paula Jones should not be allowed to sue President Clinton. He lost that argument, since the principle is regarding criminal, not civil, proceedings.

Worse, Blumenthal actually asserted executive privilege for himself when Kenneth Starr subpoenaed him as a witness. So to Blumenthal, it is a "Constitutional crisis" if the Vice President refuses a subpoena in a criminal trial, but not when a mere Presidential advisor refuses a subopeona in an executive-branch grand jury.

Pull the other one.

Even without Blumenthal's 180 on this issue, it would not be a crisis of any sort: you can't enforce a subpoena against the President or Vice President. The subpoena itself, not the rejection of it, is the real violation of separation of powers.

Again, this does not amount to being above the law (especially since, in this case, Cheney is not a target of anything, but is being called merely as a witness). If there is a real charge against a President or Vice President, the proper place for it is in the Congress, not in the courtroom.

Lastly, Blumenthal completely invents a "crisis" by gleefully imagining that if the Democrats take control of the Congress, that Bush would break the law by refusing oversight. He incorrectly implies that this is a partisan issue only occurring when Democrats are in power; the fact is that Democrats can now, even in the minority, request documents, and those requests are almost always honored.

That a request is made, however, does not imply it should be granted, as his single example makes clear: the Supreme Court refused to find that Cheney should be required to hand over the documents. The case is not over, but it is unlikely they will change their minds. Blumenthal would have you believe that the Congress, not the Court, decides when there is a Constitutional crisis.

So Blumenthal gives three examples of a "Constitutioanl crisis." All are false, and one actually damns Blumenthal and Clinton a lot more than Cheney or Bush.

I just hope Blumenthal never gave Clinton legal advice; if so, that would explain a lot.

Now Playing: Grateful Dead - Loose Lucy
use.perl.org

World Cup

| | Comments (0)
I went to some World Cup games back in '94. I was at one of the biggest U.S. wins ever, the one over Colombia. I was also at the Colombia win over Switzerland, a few days later.

These happened to be the last two games Andres Escobar ever played, as he was killed a few days later, in what most people think was some sort of retribution for knocking in the winning goal for the U.S.

I just saw a story on ESPN about rampant racism in European soccer, where fans openly ridicule black players, call them monkeys, tell them to go back to Africa, and throw bananas and peanuts on the field. (FIFA is finally promising to crack down on it, having previously relied on national organizations to solve the problem, though it remains to be seen if this will be effective.)

(It was noted that this is primarily a Spanish problem, not a continent-wide problem ... I did not mean to imply it was a problem all over Europe, only that in Europe, there is a problem. It is isolated to certain areas, but where it is a problem, it is a significant one, with hundreds or even thousands of fans participating.)

The World Cup begins this week! Get your game on! use.perl.org
<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Archive

This page is a archive of entries in the Computers category from June 2006.

Computers: May 2006 is the previous archive.

Computers: July 2006 is the next archive.

Find recent content on the main index or look in the archives to find all content.