Search Results: "mak"

26 December 2006

Enrico Zini: amis-input-and-charset

Amis and Paiwan input method and character set Arne G tje ( ) created: The scripts, especially Amis, make heavy use of Unicode combination characters. They should display well at least with the Dejavu Sans font in many applications. Try it out: if it displays correctly, you should see: Update: there is now a wiki page on i18n.debian.net.

Adam Rosi-Kessel: They Might Be Giants Are Marketing Geniuses

When They Might Be Giants started releasing kid’s albums back in 2002 with “No!”, I didn’t really understand why they had chosen to go in that direction. Two years later, though, I had a kid, and now I realize They are marketing geniuses.
(my kid)
They Might Be Giants made their mainstream debut in 1986. The oddball audience that really got it would have been between 13 and 25 years old at the time (as was I). Most of those folks now have settled down into stable jobs, disposable income (read: can afford to purchase music), and kids. For those of us worried about inculcating our children with an appropriately developed sense of irony to get them through the next century, TMBG is the perfect prescription. We can play our kids these new albums and rest assured that our kids will eventually appreciate Terry Gilliam, Ze Frank, John Belushi, and the like. And learn the alphabet (mp3) (ogg) while they’re at it:
F is far too fussy and only eats with fancy wine
G eats only gourmet but never can decide
H burns food so horrible
all I tastes is smoke
J just likes drinking juice
and K drinks only soda
(Please note the Cake tribute — which is interesting, since Cake was undoubtedly influence by TMBG.) (If you don’t get the joke, it’s “soda.”) The target audience, of course, is still “us” — those of us over 30, who are more likely to actually purchase music rather than copy it. It’s an interesting reversal of the more typical marketing plan which involves getting kids to nag their parents to buy things. It thus makes a lot of sense that TMBG is selling tracks direct online from their website in unencumbered formats — $9.99/album in MP3 format, or $11.99/album as FLAC files. An extra two bucks for lossless audio? Of course I’ll buy that! You should too.

25 December 2006

Russell Coker: DOSing Windows Vista

Chris Samual writes a good summary of Peter Gutmann's analysis of the cost of Vista (in terms of DRM).

The following paragraph in the article however seemed more interesting to me:
Once a weakness is found in a particular driver or device, that driver will have its signature revoked by Microsoft, which means that it will cease to function (details on this are a bit vague here, presumably some minimum functionality like generic 640x480 VGA support will still be available in order for the system to boot). This means that a report of a compromise of a particular driver or device will cause all support for that device worldwide to be turned off until a fix can be found.

Now just imagine that you want to cause widespread disruption - a DOS (Denial Of Service) attack against Windows users. What better option than to cause most of them to have hardware that's not acceptable to the OS? I expect that there will be many instances of security holes in drivers and hardware being concealed by MS because they can't afford the PR problems resulting from making millions of machines cease functioning. But just imagine that someone finds hardware vulnerabilities in a couple of common graphics drivers or pieces of hardware and publicly releases exploits shortly before a major holiday. If it's public enough (EG posted to a few mailing lists and faxed to some major newspapers) then MS would be forced to invoke the DRM measures or lose face in a significant way. Just imagine the results of stopping 1/3 of machines working just before Christmas!

Of course after the first few incidents people will learn. It shouldn't be difficult to configure a firewall to prevent all access to MS servers so that they can't revoke access, after all our PCs are important enough to us that we don't want some jerk in Redmond just turning them off. Of course disabling connections to MS would also disable security updates - but we all know that usability is more important than security to the vast majority of users (witness the number of people who happily keep using a machine that they know to be infected with a virus or trojan).

If this happens and firewalling MS servers becomes a common action, I wonder if MS will attempt the typical malware techniques of using servers in other countries with random port numbers to get past firewalls. Maybe Windows updates could be spread virally between PCs, this method would allow infecting machines that aren't connected to the net via laptops.

Finally, I recommend that people who are interested in such things read Eastern Standard Tribe by Cory Doctorow, he has some interesting ideas about people DOSing corporations that they work for which seem surprisingly similar to what MS is doing to itself. I'll post about my own observations of corporations DOSing themselves in the near future.

Jose Carlos Garcia Sogo: Python tips for vim

I am using Vim a lot to code in Python. One of the most important thing in Python is indent code properly as t uses indent to mark code blocks, and making that right is a bit painful, as you usually end mixing tabstops with white spaces, which makes code almost unreadable when you open it with an editor with a different tabstop setting. To avoid that, using whitespaces is recommended, but it would be nice that those could be inserted automtacally, and that is what the following lines of code added to your ~/.vimrc file make.
" Tip: set indent parameters for python files.
" Version: 0.1
" Date: 13 May 2006
"
" Description: most python scripts use four spaces for indenting, but
"              sometimes you will end up editing a script where tabs
"              are used; in these situations it can be useful to
"              automatically detect whether spaces or tabs were used,
"              and set some parameters (or call some functions) consequently.
"
" Usage: you can put this script in you vimrc and call the PyIndentAutoCfg
"        function with an autocmd associated to python files, or call
"        it manually, or put it in the python.vim syntax script, or... :-)
" Function to set parameters for python scripts that use
" spaces for indention.  This is also the default.  YMMV.
function PySpacesCfg()
  set expandtab " use spaces in place of tabs.
  set tabstop=8 " number of spaces for a tab.
  set softtabstop=4 " number of spaces for a tab in editing operations.
  set shiftwidth=4 " number of spaces for indent (>>, , ...)
  set smarttab
  set autoindent
  set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
endfunction
" Function to set parameters for python scripts that use
" tabs for indention.  YMMV.
function PyTabsCfg()
  set noexpandtab
  set tabstop=4
  set softtabstop=4
  set shiftwidth=4
  set autoindent
endfunction
" This function returns 1 if the file looks like a python script
" that uses tabs for indenting, or 0 otherwise.
function PyIsTabIndent()
  let lnum = 1
  let max_lines = 100 " max number of lines to check.
  let got_tabs = 0
  let got_cols = 0 " 1 if the previous lines ended with columns.
  while lnum = max_lines
    let line = getline(lnum)
    let lnum = lnum + 1
    if got_cols == 1
      if line =~ "^\t\t" " at least two tabs, to prevent false-positives.
        let got_tabs = 1
        break
      endif
    endif
    if line =~ ":\s*$"
      let got_cols = 1
    else
      let got_cols = 0
    endif
  endwhile
  return got_tabs
endfunction
" Check the file, and run the relative function.
function PyIndentAutoCfg()
  if PyIsTabIndent() == 1
    call PyTabsCfg()
  else
    call PySpacesCfg()
  endif
endfunction
" Call the PyIndentAutoCfg function.  Uncomment this line if you've copied
" this script in the python.vim syntax file or something like that.
" call PyIndentAutoCfg()
au BufNewFile,BufRead *.py call PyIndentAutoCfg()
Also, if you want to convert a file using tabs to spaces, you can do it by using the following Vim commands.:
:set expandtab
:%retab
Update: Stefano posted about using filetype hook files instead of au groups. I think it is smarter, and I didn't knew about after/ dir in ~/.vim. So following Stefano's advice, you should put the ebove script in ~/.vimrc/after/ftplugin/python.vim, so it gets loaded automatically when you open a Python file.

24 December 2006

Uwe Hermann: Donations for a good cause

You still got some money left after buying all those Christmas presents? How about donating some of it for a good cause:
Wikipedia is entering 2007 as one of the 10 most visited websites in the world. That's a great proof of our success. However, with this success comes a new set of challenges and responsibilities. As we plan for the future of Wikipedia and all of the Wikimedia projects, our two most important goals now are the reliability of our content and the long-term sustainability of every project in which we are involved. To meet these goals we have a lot of work to do, so I am asking for your help. In the coming year, the Wikimedia Foundation anticipates dramatically increasing spending to keep up with server and traffic capacity demands, add new staff on the organizational level, improve our software and develop methods to better ensure high quality content, all while making progress toward our goal of giving free knowledge to everyone.
-- Florence Devouard, Chair of the Wikimedia Foundation
  • Creative Commons
  • It's once again time to show your support for Creative Commons. Digital technologies are connecting people in ways that were never before possible but that network is fragile. Creative Commons needs your support to help enable a participatory culture a culture in which everyone can actively engage in the creativity that surrounds us. We need your support to assure access to cultural, scientific, and educational content that has been pre-cleared for use by its authors.
  • Free Software Foundation (FSF)
  • Freedom is more precious than anything else we have and we need to protect it while we still can.
    -- Eben Moglen in his FSF year end video appeal (OGG, 24 MB)
  • Electronic Frontier Foundation (EFF)
  • EFF is a nonprofit group of passionate people lawyers, technologists, volunteers, and visionaries working to protect your digital rights.
  • Tor: anonymity online
  • Tor is a toolset for a wide range of organizations and people that want to improve their safety and security on the Internet. Using Tor can help you anonymize web browsing and publishing, instant messaging, IRC, SSH, and other applications that use the TCP protocol. Tor also provides a platform on which software developers can build new applications with built-in anonymity, safety, and privacy features.
    Or how about some organizations not directly related to Free Culture or Free Software?
    Amnesty International (AI) is a worldwide movement of people who campaign for internationally recognized human rights. AI s vision is of a world in which every person enjoys all of the human rights enshrined in the Universal Declaration of Human Rights and other international human rights standards.
  • Red Cross
  • The International Red Cross (and Red Crescent Movement) is an international humanitarian movement whose stated mission is to protect human life and health, to ensure respect for the human being, and to prevent and alleviate human suffering, without any discrimination based on nationality, race, religious beliefs, class or political opinions.

    Evan Prodromou: 3 Niv se CCXV

    We had a tough time getting out of Encinitas yesterday. It seems like everything was going wrong. I'd forgotten to order food for a sick aunt and her family in New Jersey the night before, so I was scrambling with apologies and new orders all morning. Then, when we finally got out of town, we hit traffic for about an hour near Santa Ana. Blech! Fortunately, it's a nice stretch of California highway, and we could see Catalina Island off on the horizon to the west. Our Christmas-eve-eve (or Festivus, if you will) was spent at Maj's parents' house in Long Beach, with about 30+ Jenkinses plus various offshoots and friendly relations. They have a huge house near Long Beach/Belmont Shore, with a giant tiled patio area that goes right into the house. It was a good place for a party. Amita June got some nice gifts from family, including a screaming monkey doll dressed as Superman. Yeah, we already have one screaming monkey doll with an "I LA" t-shirt, so this new one will join our growing collection of screaming monkeys with poor sartorial taste. tags:

    Typewriters are broken Yesterday Amita June and I were playing with pyKeys, from the awesome pyToddler suite of tools, and I realized that typewriter keyboards are broken. I was showing her that when she pushed on the key marked "Q", a "Q" would appear on the screen. But that's not what happened: instead, a "q" appeared on the screen. That's not a bug in pyToddler, of course: that's just the way typewriters work. If you click on the button marked with a capital letter, it prints the lowercase letter on the paper or screen. To get the capital letter itself, you have to put the keyboard in another mode, or use a modifying chord key. I'm not sure why this is the case. It's clear why we use modifier keys to make capitals, since we type lowercase keys much more often. But why do keyboards show the capitals printed on the keys, then? tags:

    Free Culture Christmas If there's anything that gives a bracing jolt of Christmas cheer, it's 235 Creative Commons Christmas songs. Thanks to Uwe Hermann for compiling this fine list. tags:

    Julien Blache: pommed v1.0

    mbpeventd has just got a new name for Christmas, and it’s now called pommed :-) I went toward a more generic name as we’re adding support for the PowerBook too (plus it’s a semi-private joke for Yves-Alexis and me). This should, by the way, make it in the next release or the one after the next. New features: gpomme is a GTK+ client suitable for all environments; you should start it when your session starts.
    wmpomme is a WindowMaker dockapp, as the name shows. The next version will feature set methods in the DBus interface, and PowerBook support if it’s ready by then. Due to the name change and new packages, the package is in NEW. You can grab it on http://people.debian.org/~jblache/pkg/pommed in the meantime. This release means the mbpeventd-dbus branch is closed :-) Merry Christmas to you all.

    David Welton: Apples, Oranges, and Culture

    Apples and Oranges A number of people wrote irate comments after my article about Ruby's eBay API beating PHP hands down. They complained that I was comparing apples to oranges, because the Ruby library I was using was nicely crafted, whereas the PHP one was some crufty crud that just happened to be one of the first things you find when you go to developer.ebay.com. First things first, let's look at some better PHP code:
    require_once 'EbatNs/EbatNs_ServiceProxy.php';
    require_once 'EbatNs/EbatNs_Logger.php';
    require_once 'EbatNs/GetItemRequestType.php';
    require_once 'EbatNs/ItemType.php';
    $session = new EbatNs_Session('config/amd.ebay.config.php');
    $cs = new EbatNs_ServiceProxy($session);
    $cs->setHandler('ItemType', 'handleItem');
    $req = new GetItemRequestType();
    $req->setItemID(5652664344);
    $req->setDetailLevel($Facet_DetailLevelCodeType->ReturnAll);
    $res = $cs->GetItem($req);
    echo "<pre>";
    if ($res->getAck() != $Facet_AckCodeType->Success)  
    echo "we got a failure<br>";
    foreach ($res->getErrors() as $error)
     
        echo "#" . $error->getErrorCode() . " " .
        htmlentities($error->getShortMessage()) . "/" .
        htmlentities($error->getLongMessage()) . "<br>";
     
      else  
    //#type $item ItemType
    $item = $res->getItem();
    echo "ShippingTerms : " . $item->getShippingTerms() . "<br>";
    print_r($item);
     
    
    versus our Ruby code:
    require 'rubygems'
    require 'ebay'
    include Ebay
    include Ebay::Types
    require 'localconfig'
    ebay = Ebay::Api.new
    begin
      response = ebay.get_item(:item_id => '110011765264')
      puts "ShippingTerms : # response.items.shipping_terms "
    rescue Ebay::RequestError => e
      e.errors.each do  error 
        puts error.long_message
      end
    end
    
    So, they get closer with that, but the Ruby code is still clearer and more concise. If you look around at some PHP5 based examples, they start to be decent as well. As one tutorial writes:
    These components combine to create a kick-ass tool that PHP 4 can't replicate without lots of work, if at all.
    Leaving aside the fact that a lot of people are still more or less stuck on 4, I think there is something more important to be learned. Culture There are a lot of really smart people who work with, and on PHP. As much as anyone grumbles about any language, it's not easy to create one, let alone create one and make it as popular as PHP. However, as I've said elsewhere, one of the things that made PHP so successful was its ability to "scale down". Part of its value is that it made it much easier for more people with less advanced skills to create things. That is, without doubt, a very fine accomplishment, but it does bring some baggage with it. Namely, that there are a great deal of PHP programmers who do not write very nice looking code. Going back to the eBay example, the code featured on their site is not very tasteful, if you ask me. My bet is that in Ruby-land, that sort of code would not be displayed very prominently. Why? It's not the computer, it's the culture that has grown up around the different languages. Computers do not care one bit about programming languages. They interpret bits and bytes, whatever language is used, so it's really all the same to them. Programming languages matter only to people, because they are the tool we use to comunicate our instructions to machines. This means that they are a very human thing in some ways, and that human aspects of them matter a great deal. What this means is that it's important not only to design a cool language, but to create a good culture around it. To take aim at something nearer and dearer to me than PHP, one of the major failings of the Tk toolkit was that there was little to no attempt to create a good design culture around it. Anyone who was using Linux 10 years ago will surely remember some of the truly horrible things that were created with Tk. Why? Tcl and Tk made creating a GUI an order of magnitude easier than with C and Motif (or whatever windows used at the time), and turned them loose with no instructions or idea whatsoever of how to go about creating a good, intuitive user friendly one - the Tk docs themselves make little to no mention of usability, and even the best Tcl/Tk books pay almost no attention, even in the form of recommended reading, to what to make with this beautiful tool whose hows are explained very well. The unixy community also wasn't exactly a wellspring of creativity and critique in terms of good guis, either. So, yes, I know that it's possible to write good, clever, readable PHP (or Perl, or FORTRAN) code, and bad Ruby (or Tcl, or Python, or whatever) code. However, I'm also convinced that culture counts. People who value clean, beautiful code gravitate to cultures, and, where possible, workplaces where they find other like-minded people. Others, not having as many options, find themselves staring at 13000-line PHP files that grow malignantly by dint of cut and paste, wondering how to tame that which others have wrought!

    Manoj Srivastava: Arch, Ikiwiki, blogging

    One of the reasons I have only blogged 21 times in thirty months is because of the very kludgey work flow I had for blogging; I had to manually create the file, and then scp by hand, and ensure that any ancillary files were in place on the remote machine that serves up my blogs. After moving to ikiwiki, and thus arch, there would be even more overhead, were it not so amenable to scripting. Since this is arch, and therefore creating branches and merging is both easy and natural, I have two sets of branches -- one set related to the templates and actual blog content I server on my local, development box, and a parallel set of branches that I publish. The devel branches are used by ikiwiki on my local box; the remote ikiwiki uses the publish branch. So I can make changes to my hearts content on the devel branch, and the merge into my publish branch. When I commit the publish branches, the hook function ensure that there is a fresh checkout of the publish branch on the remote server, and that ikiwiki is run to regenerate web pages to reflect the new commit. The hook functions are nice, but not quite enough to make bloggin as effortless as it could be. With the movge to ikiwiki, and dissociation of classification and tagging from the file system layout, I have followed the lead of Roland Mas and organized my blog layout by date; posts are put in blog/$year/$month/$escaped_title. The directory hierarchy might not exist for a new year or month. A blog posting may also show in in two different archive indices: the annual archive index for the year, and a monthly index page created for every month I blog in. However, at the time of writing, there is no annual index for the next year (2007), or the next month (January 2007). These have to be created as required. All this would get quite tedious, and indeed, would frequently remain undone -- were it not for automation. To make my life easier, I have blogit!, which takes care of the niggling details. When called with the title of the prospective post; this script figures out the date, ensures that the blog directory structure exists, creating path components and adding them to the repository as required, creates a blog entry template, adds the blog entry to the repository, creates the annual or the monthly archive index and adds those to the repository as needed, and finally, calls emacs on the blog posting file. whew.

    Erich Schubert: Website meta langauges

    Zack asked for website meta languages for redoing his homepage. Well, I redid my homepage last february, using XML and XSLT. A monster XSLT stylesheet, because I wanted to keep my template outside of the stylesheet. I can not recommend XSLT. Using it for templating is quite messy. XSLT is okay if you want to transform one representation of the data to another; it's not if you want to add a lot of surrounding markup and things like a sitemap and similar navigation tools. This is next to impossible in pure XSLT, it gets better once you have some extensions (dubbed EXSLT, and supported by pretty much any xslt processor) or maybe with XSLT2. String manipulation is also a pain (at least with XSLT1); I gave up on generating a nice "last modified" date from my subversion tag. Supposedly XSLT2 has some functions that could make this easier (i.e. for parsing and printing datetime information), but the common approach with XSLT is to only supply the required minimum of function you need, and I'm not aware of an easy way to add custom functions, not to mention any large standard library that can efficiently be used (which is the true strength of Java, Python and C#, that they bring a huge collection of pre-written ready-to-use code with them). Of course there are some efforts to write XSLT libraries (especially for XSLT2), and this aforementioned EXSLT is some kind of standard library that even might be efficiently implemented in some interpreters - you can't rely on it to be there and to just work. XSLT isn't useless, but when it comes to presenting data to humans or writing clean, compact code it's not satisfactory at all. I'd give you my Makefile and XSLT file, if they weren't that messy... too many features; I'm generating two languages, a partially expanded navigation menu, etc. - my XSLT is 10k, my sitemap currently 4.5k, the template file is 5k. Anyway. Half a year ago, my favourite templating language was KID templating. I used it for some small projects such as my DNSoupdate tool to edit DNS zones via the DNS protocol (requires a nameserver such as bind which has support for DNS update, uses encryption). It was a perfect match for such tiny pages, but I'm no longer that convinced I still like it for larger projects. What's good about Kid: XML templating language, Python based, easy to use in whichever way you want by writing a few lines of python (i.e. easy to write a Makefile to generate a static version of you homepage) What's not good about Kid: only works with a Python interpreter. I'd prefer to have a templating language that can be used from multiple languages. However the Kid syntax relies on Python, which is really bad. Also I'd prefer to have some component-render model for more complex websites. The current setup is IMHO okay if you have one default layout and one content layout; but if you have multiple components that could be combined differently on the pages, it gets too messy. With my turbogears experiments, Kid was also not very performant (but that might as well be Turbogears fault). Right now, I'd probably still go with Kid. But I've been having a look at JSP 2.1, and JSF / Facelets in particular. There are some things about facelets that I really like (for example, that they use a proper XML syntax, instead of this bastardized almost-XML that JSP usually (ab-)uses). There is also some stuff that I don't like (e.g. the massive overengineering of everything surrounding it), and I have no idea how easy it will be to generate static pages in a scripted fashion, i.e. using it without a real webserver. Or I might just write it all in python, which is a nice language for manipulating XML, usually. Please don't just send me an email with your favourite templating engine. Like zack, I'm only interested in XML-based templating engines, which does not apply to most templating solutions out there. Clearsilver for example is another bastardization of XML. I'm aware of TAL/METAL, and find them quite interesting, but they were also not having this kind of componentization that I'm usually thinking in. [Update: some people have pointed me to Genshi, which is mostly Kid compatible. However, it still has mostly the same problems, e.g. the templates being not reusable in other languages than python, and that certain constructs are a pain to do (e.g. the page_specific_css recipe with more than one css file). Others have pointed me to smarty, but it's string-based and doesn't ensure valid XML output. (Which is very useful for e.g. generating atom or rss output) For example this is probably valid in smarty: if 0 <b> /if </b> - allowing errors is bad. Oh, and smarty is PHP, which is broken by design, a no-go. The best match to my ideas so far is XML::Template (for Perl, Python, Ruby, PHP) which is pretty close to what I've been doing manually when not using a templating solution. I don't know yet how well it handles recursion - I need recursive templates for the navigation menu on my homepage.]

    23 December 2006

    Russell Coker: installing Debian Etch

    A few days ago I installed Debian/Etch on my Thinkpad. One of the reasons for converting from Fedora to Debian is that I need to run Xen and Fedora doesn't support non-PAE machines with Xen. Ironically it's hardware supplied to me by Red Hat (Thinkpad T41p) that is lacks PAE support and forces me to switch to Debian. I thought about just buying a new dual-core 64bit laptop, but that seems a bit extravagant as my current machine works well for everything else.

    Feeling adventurous I decided to use the graphical mode of the installer. I found it a little confusing, at each stage you can double-click on an item or click on the continue button to cause the action to be performed. The partitioning section was a little unclear too, but given that it has more features than any other partitioning system I've seen I wasn't too worried (options of creating a degraded RAID array and for inserting a LUKS encryption layer at any level are really nice). The option to take a screen-shot at any time was also a handy feature (I haven't yet inspected the PNG files to see what they look like).

    Another nice feature was the way that the GUI restarts after a crash. While it was annoying that the GUI started crashing on me (and would have prevented a less experienced user from completing the install) the fact that it didn't entirely abort meant that I could work around the problem.

    I have not yet filed any bug reports against the installer because I have not done a repeatable install (there is a limit to how much testing I will do on my most important machine). In the next few days I plan to do a few tests of the graphical installer on test hardware for the operations that are important to me and file appropriate bug reports. I encourage others to do the same, the graphical mode of the installer and the new encryption and RAID features are significant improvements to Debian and we want them to work well.

    I have realised that it won't be possible to get SE Linux as good as I desire before the Etch release, even if the release is delayed again. I'm not sure how many fixes can go in after the release (I hope that we could move to a model similar to RHEL - but doubt that it will happen). So I now plan to maintain my own repository of Etch SE Linux packages and for other packages which need changes to make them work in the best possible manner with SE Linux. I will append something like ".se1" to the version of the packages in question, this means that they will be replaced if a security update is released for the official package. Apart from the SE Linux policy packages (for which any security updates will surely involve me) the changes I am going to make will not be major and will be of less importance than a security update.

    I will also add other modified and new packages to my repository that increase the general security of Etch. Apart from SE Linux all the changes I intend to host will be minimal cost issues (IE they won't break things or increase the difficulty of sys-admin tasks), and the SE Linux related changes will not break anything on non-SE systems. So someone who wants general security improvements without using SE Linux might still find my repository useful.

    Manoj Srivastava: Mail Filtering With CRM114: Part 1

    The first step is to configure the CRM114 files, and these are now in pretty good shape as shipped with Debian. All that I needed to do was set a password, say that I'd use openssl base64 -d, and stick with the less verbose defaults (so no munging subjects, no saving all mail, no saving rejects, etc, since I have other mechanisms that do all that). The comments in the configuration files are plenty good enough. This part went off like a breeze; the results can be found here (most of the values are still the upstream default). The next step was to create new, empty .css files. I have noticed that creating more buckets makes crm114 perform better, so I go with larger than norm crm114 .css files. I have no idea if this is the right thing to do, but I make like Nike and just do it. At some point I'll ask on the crm114-general mailing list.
        % cssutil -b -r -S 4194000 spam.css
        % cssutil -b -r -S 4194000 nonspam.css
    
    
    Now we have a blank slate; at this time the filter knows nothing, and is equally likely to call something Spam or non-Spam. We are now ready to learn. So, I girded my loins, and set about feeding my whole mail corpus to the filter:
     /usr/share/crm114/mailtrainer.crm               \
       --spam=/backup/classify/Done/Spam/           \
       --good=/backup/classify/Done/Ham/            \
       --repeat=100 --streak=35000                  \
             egrep -i '^ + train Excell Running'
    
    
    And this failed spectacularly (see bug #399306). Faced with unexpected segment violations, and not being proficient in crm114's rather arcane syntax, I was forced to speculation: I assumed (as it turns out, incorrectly) that if if you throw too many changes at the crm114 database, things rapidly escalate out of control. I went o to postulate that as my mail corpus was gathered over a period of errors, the characteristic of Spam drifted over time, and what I consider Spam has also evolved. So, some parts of the early corpus are at variance with the more recent bits. Based on this assumption, I created a wrapper script which did what Clint has called training to exhaustion -- it iterated over the corpus several times, starting with a small and geometrically increasing chunk size. Given the premise I was working under, it does a good job of training crm114 on a localized window of Spam: it feeds chunks of the corpus to the trainer, with each successive chunk overlapping the previous and succeeding chunks, and ensuring that crm114 is happy at any given chunk of the corpus. Then it doubles the chunk size, and tries goes at it again. All very clever, and all pretty wrong. I also created another script to retrain crm114, which was less exhaustive than the previous one, but did incorporate any further drift in the nature of Spam. I no longer use these scripts; but I would like to record them for posterity as an indication of how far one can take an hypothesis. What it did to was have crm114 learn without segfaulting -- and show me that there was a problem in the corpus. I noticed that in some cases the trainer would find a pair of mail messages, classify them wrongly, and retrain and refute -- iteration after iteration, back and forth. I noticed this when I added the egrep filter above, and was not drowning in the needless chatter from the trainer. It turns out, I had very similar emails (sometimes, even the same email) in the Ham and the Spam corpus, and no wonder crm114 was throwing hissy fits. Having small chunks ensured that I had not too many such errors in any chunk;and crm114 did try to forget a mail differently classified in an older chunk and learn whatever this chunk was trying to teach it. The downside was that the count of the differences between ham nd Spam went down, and the similarities increased -- which meant that the filter was not as good at separating ham and Spam as it could have been. So my much vaunted mail corpus was far from clean -- over the years, I had misclassified mails, been wishy-washy and changed my mind about what was and was not Spam. I have a script that uses md5sums to find duplicate files in a directory, and found, to my horror, that there were scores of duplicates in the corpus. After eliminating outright duplicates, I started examining anything that showed up with an ER (error, refute) tag in the trainer output; on the second iteration of the training script these were likely to be misclassification. I spent days examining my corpus and cleaning it out; and was gratified to see the ratio of differences to similarities between ham and Spam css files climb from a shade under 3 to around 7.35. Next post we'll talk about lessons learned about training, and how a nominal work flow of training on errors and training when classifiers disagree can be set up.

    Enrico Zini: amis-character-list

    Character list for the Amis language We mapped the available glyphs and accents for the Amis language. The letters in alphabetical order:
        a c d f n  h i k l m n o p r s t u w y
    
    Everyone of them can get an acute, grave or circumflex accent on top. Literally on top: i would get the dot PLUS the accent on top. The only exception is for the letter n , which gets the dot on top of the g replaced by the accents. Some accent combinations are missing in Unicode, like accented d, f, h and k, and i with dot and accents. So we need an extension of Unicode. Then we need an input method that would insert n instead of g and allow to type all the accent combinations. Here is the full character set:
        a              
        c       ?      
        d       ?  ?  ?
        f       ?  ?  ?
        n       ? n  n  [1]
        h       ?  ?   
        i       ?  ?  ? [2]
        k       ?     ?
        l       ?     ?
        m       ?     ?
        n             ?
        o              
        p       ?     ?
        r       ?     ?
        s       ?      
        t       ?  ?  ?
        u              
        w              
        y              
    
    [1] the gliph for 'n ' is actually missing, because it needs to be a single character: since it is a letter, backspace and delete need to erase all of it in a single shot. [2] missing because of the accent on top of the dot. Question marks mark where a character is currently missing in Unicode. We have a problem because Unicode would not want anymore latin accent combinations, so we will need to use character combinations and hope that fonts and applications display them well. This raises the issue that hitting delete or backspace on a character built using combining accents would delete only half of it. For consistency of interaction, it can make sense to use combining accents for all the combinations, even if an accented letter does exist in Unicode. This would avoid backspace and delete to have different behaviors, for example, on s-grave and s-acute. The accents are not taken into account when sorting. Uppercase letters are not used.

    22 December 2006

    Thijs Kinkhorst: Christmas time, gadget time

    gadget overview Time for a gadget update. I've bought an iPod Shuffle last month which was an excellent buy. It's very simple and just does what it needs to do, nothing more and nothing less. Thanks Steve. Google was nice enough to send me a digital photo frame that can load flash cards containing photos, movies and mp3s. Thanks! It looks a lot better than all the loose pictures. I bought some technical stuff at the traditional IBA computerjunk-for-charity auction, namely an old spotty keyboard, two USB ports and a CueCat barcode scanner: .C3nZC3nZC3nZE3fZE3n1CNnY.bNjW.CxzZCNnWE3rZC3nZCq. It scans a lot of the items I have around the house, but I'm still not sure to what actual use I'll be able to put it. If Jaap succeeds on making a RAID array out of the two floppy drives he bought, I'm doubling his bid. XS4ALL sent me a 3 megapixel digital video camera (!), a USB Voice over IP phone and to top it off a gift voucher for a free vlaai. I'm overwhelmed with the generosity, thanks a lot guys!

    Ian Murdock: GoogleOS: Never gonna happen

    Emre Sokullu is writing about a hypothetical “GoogleOS” again. As a long time OS guy, let me be the first to say that this makes absolutely no sense whatsoever. For one thing, Google already has an “operating system”. It’s the web, and Google dominates the web, so why in the world would they give their main competitor such an obvious advantage by moving into its turf? Furthermore, Google no more needs an operating system in the traditional sense of the word than it needs an office suite in the traditional sense of the word. Releasing yet another Linux distribution isn’t disruptive—redefining what an operating system is is disruptive, and Google’s already doing that. Two predictions for 2007 that I’m fairly sure will hold up: 1. This won’t be the last of the GoogleOS speculation; and 2. there won’t be a GoogleOS.

    21 December 2006

    Josselin Mouette: Christmas for childish developers

    Although you've not behaved very good, Santa Claus has a present for you: the entire GNOME 2.16.2 desktop in experimental. All core applications are here, only some bindings are still missing. Which means it's time for the most courageous to test it. With the experimental APT source configured, it should be a matter of apt-get install -t experimental gnome-desktop-environment. Be warned, it's still rough around the edges:But there are also many pleasant speed and UI improvements in most modules. Unfortunately for many, it is currently only available on amd64. Now, if a group of reindeers could rebuild it on i386, the children would be much happier. Otherwise, I will take some time to rebuild them in an i386 chroot in a few days.

    Lucas Nussbaum: Debian Package of the Day is now alive again, and needs your help!

    For those who have missed the previous blog entries: Debian Package of the Day (aka Deb-a-day) is now alive again ! There has already been several entries (published 2 times a week, on wednesdays and sundays, until we make sure that we can sustain an higher rate): Deb-a-day is not syndicated on Planet Debian (because of the “only personal blogs” rule), but it’s syndicated on Planet Ubuntu, and it might be syndicated on Debian Times (negociations are still ongoing :-). Don’t forget to subscribe to the feed ! We (the nice team of editors) have 2 entries ready in the queue, but that’s not enough. If you discovered an interesting package through Deb-a-day, and didn’t submit an entry yet, you should really feel guilty now ! (we are especially looking for cool graphical apps, so Deb-a-day becomes less nerdy, but apps for nerds are welcomed as well, of course.)

    Erich Schubert: On military usage of FLOSS.

    Sergey raised the issue of restricting use of software to non-military use, and Alan pointed out how much they've given back to the FLOSS community. However, I'd like to point out that any such restriction violates rules for opensource used by both the FSF and Debian. Debian is pretty clear about it in the social contract:
    No Discrimination Against Fields of Endeavor

    The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.
    And in the GNU Free Software Definition:
    The freedom to run the program, for any purpose (freedom 0).
    So any such restriction would mean your software is no longer free software. It's not that I'm in any way pro military, but allowing usage restrictions will cause a huge mess. Next we'll have some application which may not be used by religious zealots (of any kind), paedophiles, and at some point end up with a huge licensing mess (maybe even full of discrimination). ("No, I can't sell you a web server, because your brother-in-law is in the military."?) Actually disallowing any military use is some kind of discrimination, too. Military is not only used to kill someone, but it can serve humanitarian purposes, too. Rescue people in flooded New Orleans etc. - if you are unhappy with what your government is using your military for, vote accordingly and do politics. It's fine if you as the author point out that you disapprove of any use of it to harm anybody, or commit crimes; but don't put up restrictions you couldn't verify anyway. (As if the military would care much for any such restriction, anyway.) Always remember: it's only the good guys playing by the rules. There is no use in disallowing use of some software for cracking, is there?

    Enrico Zini: etch-on-asus-U5F

    Debian Etch on Asus U5F Model Asus U5F, with Intel Core 2 Duo T5500 Distribution Debian Etch amd64. Summary Video: works, with 3D and everything. Audio: works, with a little config change. Wireless LAN: works, with drivers from non-free. Bluetooth: works. Ethernet: works. SD card reader: works. DVD reader/burner: works. ACPI features: various problems. Suspend: broken. Installation and wireless card To have the wireless card working you need some package from non-free that is not provided with the standard installer. I installed using the binary 1 CD, then I fetched the following packages from unstable:
    firmware-ipw3945_0.3_all.deb
    ipw3945d_1.7.22-2_amd64.deb
    ipw3945-modules-2.6.18-3-amd64_2.6.18+1.1.2-2_amd64.deb
    linux-headers-2.6.18-3_2.6.18-8_amd64.deb
    linux-image-2.6.18-3-amd64_2.6.18-8_amd64.deb
    
    Once those packages are installed, wireless just works. Video Intel 945GM/GMS/940GML It just works, with 3D and everything. To turn on AIGLX and Compiz, just follow the HOWTO in the Debian wiki. Audio Intel 82801G To make it work add:
    options snd-hda-intel model=laptop-eapd
    
    to /etc/modprobe.d/alsa-base. Rationale: this link gives the quick solution. Note: no need to reboot:
    /etc/init.d/alsa unload
    modprobe snd-hda-intel
    
    The list of models available for the driver is in /usr/share/doc/alsa-base/driver/ALSA-Configuration.txt.gz A hint about the model to use can be found at the beginning of /proc/asound/card0/codec#0. CPU speed scaling Just modprobe speedstep-centrino. Then the cpufreq_ondemand module works fine. I'm a bit disappointed that it doesn't want to go below 996Mhz (60%) and it has only 3 scaling modes: 1.66 GHz, 1.33 GHz, 996 MHz. It used to display available scaling modes weirdly (it would repeat 1.66Ghz 6 times), then I updated the BIOS to version 304 and now it shows just those 3. The laptop tends to get warm, this disappoints me. I hope things will improve with newer kernels. USB Just works. SD card reader Just works. I put an SD card in and it gets mounted automatically. In the old Asus M2 the card reader was just some unsupported obscure thing. Ethernet RTL8111/8168B Gigabit Ethernet. I'm not sure it was working in the installer, but in the installed system it works out of the box. Very pleasant thing: it can cross the cable if needed. DVD reader/writer Just works. I haven't tried burning CDs or DVDs, but k3b sees it and correctly detects the writing speed. Bluetooth Just works. I connected to the bluetooth GPS just fine. ACPI Still quirky. Brightness control buttons don't work: before updating the BIOS I would get this reaction on syslog:
    Dec 17 23:57:35 viaza kernel: ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.SBRG.EC0_._Q0E] (Node ffff81003e98bd90), AE_NOT_FOUND
    Dec 17 23:57:35 viaza kernel: ACPI Error (psargs-0355): [\_SB_.PCI0.P0P2.VGA_.LCDD] Namespace lookup failure, AE_NOT_FOUND
    
    After updating the BIOS I get this reaction instead:
    Dec 21 21:17:38 viaza kernel: video device notify
    Dec 21 21:17:38 viaza kernel: set_level status: 0
    Dec 21 21:17:38 viaza kernel: compiz.real[4013]: segfault at 0000000000000060 rip 000000000040b3b0 rsp 00007fff6c47f4e0 error 4
    
    compiz segfaults and I'm back to gdm, with the brightness unchanged. The LCD on/off button works. Controlling the LCD via software does not work:
    # echo 1 > /proc/acpi/asus/lcd
    Dec 21 22:22:45 viaza kernel: Asus ACPI: Error switching LCD
    # cat /proc/acpi/asus/lcd
    Dec 21 22:22:49 viaza kernel: Asus ACPI: Error reading LCD status
    0
    
    In fact, asus-acpi complains:
    Dec 21 17:08:29 viaza kernel: Asus Laptop ACPI Extras version 0.30
    Dec 21 17:08:29 viaza kernel:   unsupported model U5F, trying default values
    Dec 21 17:08:29 viaza kernel:   send /proc/acpi/dsdt to the developers
    
    Therefore, I sent the dsdt to the developers. The wireless on/off button turns on and off the wlan and bluetooth leds, and apparently also the wireless hardware. I still don't know how to turn off bluetooth and leave wlan on. Suspend Suspend to ram works, but on resume it does not turn on the LCD display. The LCD on/off button has no effect. Other things work fine, so I can blind-type a shutdown command. I have vbetool installed, but it doesn't seem to help. So far, suspend is still not usable. Modem Not tried.

    Uwe Hermann: Broken hard drive woes and viable backup options for huge data amounts

    Hardware sucks. It just totally and utterly sucks. I purchased a 300 GB hard drive (plus a 3.5" USB disk drive enclosure) roughly 8 months ago which I encrypted using dm-crypt and then used it as a backup medium. And now the disk has died. No, this is not a software problem (that would be easy to deal with), the hardware is simply dead (it's making funny "klck" noises all the time). Mounting it via USB (using the USB enclosure) doesn't work at all anymore. I connected the disk via IDE in a PC and was able to mount it just fine (with cryptsetup luksOpen and all). A simple ls works, too (at least in the top-level directory). So I tried to copy the data over to another medium, but when accessing certain directories or files the system simply hangs and I get tons of funny kernel errors (and the disk makes even more and louder funny noises). Great. Stupid as I am, I also put data on the drive which I did not have backups of on other media (mostly because the data is huge, e.g. conference video recordings, large amounts of Creative Commons MP3s etc). OK, so I managed to get at least some small parts of my data, but now the disk is completely dead, I fear. I'll try to convice the vendor to give me a new drive, but I won't let them get their fingers on my data, i.e., I will not send the disk to them (yes, even though it is encrypted; crypto can be broken). Any ideas what else I could do? A professional "data recovery" service is not an option either, they usually cost 1000-2000 Euros (in the best case). What do you do for storing huge amounts of data nowadays? The only viable option I can think of is a RAID-5 (mdadm) with 3 or more disks in a silent PC which I can leave turned on 24/7. Unfortunately that costs non-trivial amounts of money. CDs are too small and they don't last too long either; the same is true for DVDs. Sigh...

    Next.

    Previous.