flaccda

| No Comments | No TrackBacks

Tools available with Fedora and Red Hat Enterprise Linux for converting CDs to lossless FLAC archives include Sound Juicer, Rhythmbox, and the command line tool abcde. The first two are graphical applications in Gnome that use MusicBrainz for metadata; the latter provides numerous options for converting to FLAC, Vorbis, and MP3 (among other formats), using CDDB for metadata. I wanted something simpler, resulting in a minimal set of metadata, and following a stricter Unix model of a tool focused on one job, doing that job well.

The result, flaccda, is a POSIX compliant script for converting CDs to FLAC, and a supporting script for removing MusicBrainz metadata from FLAC archives created by tools such as Sound Juicer. This keeps the metadata consistent with FLAC files created by flaccda.

The source and SRPM may be downloaded from my website at http://deevans.net/hacking/flaccda.

T61p Backlight

| No Comments | No TrackBacks

I've been having a problem with the back light on my T61p (T7500), after a text terminal (runlevel 3) screen blank (stand by, not suspend?), running Fedora 11. After logging off, the text terminal screen goes blank as a power saving feature. However, upon restore the backlight setting is one fifth full luminosity.

After a bit of digging, the acpitool manual claims it can update the brightness setting (with -l x) using the /proc/acpi/ibm/brightness file. However, the file doesn't exist. I did find the brightness file under /proc/acpi/video/VID1/LCD0/. A redirect of the highest setting restores luminosity (the setting is 1 through 100; after the screen blank it had gone down to 28): echo 100 > /proc/acpi/video/VID1/LCD0/brightness

The last problem is one of persistence. The pm-utils package may provide the answer. After reading documentation in /usr/share/doc/pm-utils/, I was able to construct a script to place in /etc/pm/sleep.d/ which would be run after a resume/thaw:

#!/bin/sh
# 70bl
# pm-utils sleep.d hook to restore backlight.
#
# Copyright 2009 David Egan Evans 
# PO Box 573602, Murray UT 84157 USA
#
# Permission to use, copy, modify, and distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all
# copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
# OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

VERSION="0.04"

if [ $# -ne 0 ]; then
 while [ $# -gt 0 ]; do
  case "$1" in
   hibernate|suspend)
        service haldaemon stop
        exit 0
        ;;
   resume|thaw)
        service haldaemon start
        echo 100 > /proc/acpi/video/VID1/LCD0/brightness
        exit 0
        ;;
  esac
 done
fi

What the xHTML!?

| 1 Comment | No TrackBacks

I have two opinions regarding xHTML. First, xHTML should not be used for public consumption. Second, xHTML should be used for public consumption. The latter stems from the original vision of xHTML and the W3 recommendation that the World Wide Web transition away from HTML to XML/xHTML. The former stems from this failure.

HTML 3 was a failure, too. It was realized that markup for visual presentation made information inaccessible to non-visual parsers (and by extension, the blind, and in some cases, the hearing impaired). The strength of HTML 3 was backward compatibility to IETF HTML. HTML 4, therefore, in a large effort to also be backward compatible, offered the Transitional document type definition that could be used for transitioning HTML 3 documents to 4. The expectation was that new documents would be written in Strict. HTML 4 also introduced frames, a method of embedding multiple HTML documents into a single view. This latter technology, as with the former visual markup inherent to HTML 3.2 in Transitional, was rejected when finally formalized as an ISO standard (15445:2000E).

The same form of thinking was attempted with xHTML. Though certain elements of HTML 4 were deprecated in xHTML 1.0, and certain deprecated elements of HTML 3.2 removed, a backward compatibility was attempted with xHTML 1.0 that would transition HTML 4 documents to xHTML. As with HTML 3.2, this was a failure. The difference is that what xHTML offered (XML) was not recognized, and it did not present any new features (other than what was inherent to XML) from HTML 4.

The problem with xHTML 1.0 is not inherent, but relative to the need for xHTML/XML user agents to parse xHTML pages. The backwards compatibility was lost. What made this worse is the informative suggestion of xHTML 1.0's Appendix C. This suggested that xHTML could be served to HTML user agents, even though xHTML was incompatible with HTML, because existing web browsers (which were and are the most popular form of user agent) already had built in error correction facilities that would overlook the incompatibilities as tag soup syntax errors. If the MIME types note is adhered to, the implication of Appendix C becomes a reliance on the HTTP protocol capability to send user agents what document types were available (and user agents to advertise what they could use), so that server negotiation could be used (such as Apache's MultiViews directive) to send an xHTML document as text/html for HTML user agents, and as application/xhtml+xml for xHTML and XML user agents, respectively. The problem is that though the W3 front page does this, nearly no one else does, even some W3 projects.

The W3, and Tim Berners-Lee, have decided to slow down the approach to an XML only world wide web. The future is to deprecate xHTML 1.0 with new recommendations that will attempt to replace xHTML 1.0 with xHTML 5, while replacing HTML 4.01 with HTML 5. HTML 5 will have the graceful upwards compatibility to xHTML 5 that was originally hoped for with xHTML 1.0 and backwards compatibility with HTML 4.01. This will allow an intermediate process of adoption of XML technologies, while still allowing user agent developers, such as those for the HTML only Internet Explorer web browser, to continue as they are. The xHTML2 Working Group will continue to build on the work found in xHTML 1.0 and 1.1.

This is a more realistic model. Standards recommendations should reflect what people do well, not what standards bodies want people to do. The problem with xHTML 1.0 was a lack of foreseeing that not every one would adopt XML immediately, or understand how it is different. Appendix C of the xHTML 1.0 standard informs developers, and web server administrators, to send xHTML 1.0 documents to non-xHTML user agents, but with the assumption that the world would transition to xHTML. Except that Microsoft's Internet Explorer, as of IE8 beta 2, is still working on support of HTML technologies, and most developers adopted xHTML as if it were a HTML technology, sending xHTML as text/html to everyone, and neglecting entirely XML user agents. This has the very opposite effect that xHTML 1.0 was intended to achieve.

As much as my preference is for the adoption of xHTML, for now, the best solution seems to be to abandon xHTML 1.0 for public consumption (only sending it with the correct MIME type when used, and abandoning the Appendix C model), use xHTML technologies (Ruby, XForms, MathML, etc.) where its XML capabilities are necessary (such as in embedded devices), and use the existing HTML 4 recommendations, and the ISO standard based on it, for the Desktop using public until such time as HTML only user agents are no longer prevalent.

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

Categories

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.32-en