Search Results: "ana"

3 January 2009

Julian Andres Klode: python-apt: Deprecation of mixedCase names, re-organisation of apt.progress, and more


[as sent to deity@lists.debian.org] Hello, while hacking a bit on python-apt in the last days, I formulated some
proposals which I want to present to you. I have already implemented proposals I and VII, started with the implementation
of proposal II, and have partially implemented proposal III, all in
my local branch. I could implement the rest next week, and this could
result in python-apt 0.7.9~exp2 (at least this is my wish, I do not
have commit access to the python-apt repository, and this mail is not
discussed yet :) ). My local branch is not online yet, but I m working on it. It is based
off debian-sid revision 202 (which is 0.7.9~exp1). I would have also suggest to (at least partially) follow PEP 7 (C code),
but re-indenting the whole extension code is not a good idea. Before I go on, I would like to know your opinions about these proposals,
what you like and what not, your suggestions, etc, etc List of Proposals
 I   Deprecation of mixedCase naming conventions in apt module
 II  Re-organisation of the apt.progress module
 III Language updates
 IV  Unification of testing code
 V   Cleanup of the code
 VI  Using unique variable names throughout the modules
 VII Some other changes
 
I. Deprecation of mixedCase naming conventions in apt module In order to comply with PEP 8, we should start to change our names
from mixedCase to lowercasewithunderscores style. This style is
more common in the Python world, and used eg. in the Python library. I hereby propose that:
  1. a new module apt.deprecate is introduced, which provides functions
    for compatibility and a class named DeprecateMixedCase
  2. Most classes are changed to subclass DeprecateMixedCase instead of
    object.
  3. All methods, attributes and variable names are changed from the
    mixedCase style to the lowercasewithunderscores style.
  4. apt_pkg will be changed to call the new methods on progress objects,
    and fall back to the old names if methods with new names are not
    available.
How backward compatibility is implemented: The DeprecatedMixedName class provides the methods getattr()
and setattr(). These classes will forward all access to attributes
with mixedNames to the ones with lowercasewithunderscores names. In case of methods, the getattr() method returns a helper function
which fixes all keyword arguments with mixedCase names and than calls
the right function. As this only works for methods with mixedCase names, methods which have
mixedCase-named args, get the argument **kwds, and its content will be
checked for mixedCase-named arguments. [On the other side, given that
the API is marked as not stable, we could also drop that level of
compatibility.] Schedule:
  1. Implement all the changes in an experimental version of python-apt
    as soon as possible.
  2. (A) Once all packages have been adjusted to use the new names, remove
    the old ones (about 50 binary packages, and I would write the needed
    patches). This would Breaks: about 50 packages.
    or
    (B) After the release of Debian Squeeze, remove the compatibility
    functions (and the deprecate module from apt). This is the same
    as (A), but does not require Breaks on 50 packages.
Known Issues:
  1. The methods will not be available using their oldName at class
    level, only at object level. This means that some code subclassing
    apt.* classes may fail. Most code will not break, however.
II. Re-organisation of the apt.progress module The apt.progress module is not very consistent in the way classes
are named. For example, there is OpTextProgress but TextFetchProgress. Therefore, I hereby propose that:
  1. For each of the for types of progress ( Cdrom , Fetch , Install , Op ),
    a new class is introduced with the name: Abstract%sProgress % progress
  2. For each type of progress a class Text%sprogress % progress is introduced,
    which subclasses Abstract%sProgress and provides textual output
  3. For further classes, a general naming scheme is introduced, which is
    %(outputtype)s%(progresstype)sProgress [whereas (1) and (2) implement
    this naming scheme]
Schedule: Same as in proposal I. III. Language updates The apt package has been written some time ago, and has not been updated
to make use of the latest language features. Therefore, I propose that:
  1. all code using old language features is adjusted to use language
    features as of Python 2.5.
    1.1 Examples include the use of decorators, and the use
    of str methods instead of functions of the string module.
  2. The with statement will be used where appropriate, and that
    apt_pkg.*Lock() gain support for being used as context managers.
Schedule: Implement as soon as possible. IV. Unification of testing code Most modules ship test code which will be called when the module is
run as a script. Therefore, I propose that:
  1. All testing code in the apt module is removed
  2. All the tests in the tests directory of python-apt
    are converted to a unified testing suite.
  3. Testing code which has been removed as part of (1) is
    reintroduced in the relevant test module, if appropriate.
Schedule: Implement as soon as possible. V. Cleanup of the code In accordance to PEP 8, which is also named as a rule in apt/README.apt,
code will be reformatted where needed. This includes 2 lines between module-level definitions, spaces after
, , comparing to None using is instead of = , and more. Schedule: Implement as soon as possible. VI. Using unique variable names throughout the modules I hereby propose the following names:
 cache    - An apt.cache.Cache() object
 pkg      - An object returned by cache[str()] (in special cases)
 pkg      - An apt.package.Package() object
 cand     - An object returned by depcache.GetCandidateVer()
This would remove some confusion for developers, especially
if you see that apt.Package() objects are named cand in debfile,
but pkg everywhere else. Schedule: Implement as soon as possible. VII. Some other changes Here is a list of other changes I have already made in my branch:
  • Remove apt.package.Record(), it behaves exactly like the
    object it is wrapping (apt_pkg.ParseTagFile() result)
  • Move the Origin class out of the Package() class and at
    the module level.
  • If a package should be marked for upgrade, but is not upgradable
    raise an exception (which will be apt.package.NotUpgradableError)
Schedule: Implement as soon as possible. Posted in Debian

Steve Kemp: Some of us are just better at hiding it, that's all.

Since I managed to get my blogspam plugin listed on wordpress.org I've seen a surge of interest. In the past few hours capture stats are:
Good comments1
SPAM comments100
Almost exactly 1% of submitted comments are OK, and a SPAM rate of 99%. Either forum and blog spam are even more rife than I'd expected or I am over-zealous! Anyway that's enough on this topic for a while, if you want to follow the work you know where to look and if you don't my writing about it again will just drive you mad.. ObFilm: The Breakfast Club

Lior Kaplan: Network bonding types and configuration in Linux


A few days after the first time I created a network bonding device in Linux, I had to create two network bonding on the same machine. Sounds simple, but it seems that be default you can create only one device. As I tried to figure how to create two devices, I had a chance to investigate a bit on the issue of network bonding. While the setting in /etc/sysconfig/network-scripts are quite simple and straight forward (see the RHEL References guide - Channel Bonding Interfaces), the settings in /etc/modules.conf hold some options to choose from. First, we need to have a line the says that the device is a bonding device, so the the bonding module will manage it: alias bondX bonding Most how-to also sugget to add the following line: options bond0 mode=0 miimon=100 or options bond0 mode=1 miimon=100 But the mode parameter has a meaning that the system administrator should choose:
  • Mode 0 or balance-rr is the Round-robin policy which gives fault tolerance and load balancing. This mode sends are receives package on each node in a sequential order. So the load is distributed on all NICs.
  • Mode 1 or active-backup which gives only fault tolerance without load balancing. This modes sends all packets through the one active slave. The slave changes only if the active slave fails.
Other, more advanced modes are documented in the Kernel documentation at Documentation/networking/bonding.txt and the RHEL References guide - bonding Module Directives. Returning to my original issue - creating two network boding devices. By default the bonding module let you create only one bonding device, adding the line options bonding max_bonds=2 to /etc/modules.conf lets you (after reloading the driver) to make two bonding devices. Notice that this time the options are for the bond module and not for a specific alias of the module. RHEL5, lets you change the bonding options in the bond config file (e.g. /etc/sysconfig/network-scripts/ifcfg-bondo), with the BONDING_OPTS variable: BONDING_OPTS="mode=1 miimon=100". On RHEL4, you can achive the same goal with these settings in /etc/modules.conf: alias bond0 bonding
options bond0 -o bond0 mode=1 miimon=100
alias bond1 bonding
options bond1 -o bond1 mode=0 miimon=50
as it causes the bonding module to be loaded twice and alias each one of the differently. On RHEL machines you ll need the iputils packages, which has /sbin/ifenslave to add the slaves to the bond when the are configured. Posted in Red Hat Enterprise Linux, System Administration

Dirk Eddelbuettel: Multiseat setup via Userful

As I had blogged a while back, multiseat use broke following the normal upgrade to Ubuntu 8.10. I had also suggested a fix but it turns out that the fix didn't work. So we had a clear regression -- multiseat use of a single Ubuntu workstation with two screens, two keyboards and two mice no longer worked. Consequently, the kids ended up 'serializing' access to their computer letting the second screen go idle. Shortly after Christmas, that computer suffered a catastrophic disk failure (and as an aside, I hate LVM when that happens...). So I reinstalled, this time using the Ubuntu rather Kubuntu variant. This should allow use of Userful Multiplier --- a commercial multiseat solution with free two-seat licenses. The base package even comes via the Ubuntu repos. I still had a couple of minor issues. One was possibly related to the Radeon card (as in: don't drive one monitor in dvi mode and one in analog mode but rather use both in analog mode via a dvi/analog dongle) so the live cdrom offered by Userful just went into a perpetual 'reconfigure, reboot, reconfigure, reboot, ...' loop. Another hitch was that their license manager no longer wanted to use the license key I had requested in November when I tried in vain to use Userful with KDE. And of course I wouldn't a new key as the home ip address hadn't changed... Now, with a newly requested key from another IP address, things appear to work at last using the default Gnome setup --- and the kids are back in proper 'parallel' use of their workstation. All in all, Userful Multiplier is a nice and useful product especially as long as stock XFree does them the favour of no longer competing in the basic two-seat case.

2 January 2009

Michael Casadevall: Notes from Underground, Part 1

For those following d-devel, you may notice that I've recently been working on improving one of the cornerstones of Debian infrastructure; the Debian Archive Kit, or dak for short. Most DDs and DMs don't notice dak exists expect when trying to determine why their latest upload was rejected, and then yelling at the powers that be. I'm here to shead some light on this mythicial beast.

First off, a quick history lesson:

dak (also known as projectb) is a replacement for Debian's original archive software, known simply as dinstall. dinstall itself was a fairly large perl script that does what dak process-unchecked/process-accepted does today. James Troup did a fairly decent summary of dinstall, and its issues

James Troup's README.new-incoming (from dak's git repo):

The old system:
---------------
o incoming was a world writable directory

o incoming was available to everyone through http://incoming.debian.org/

o incoming was processed once a day by dinstall

o uploads in incoming had to have been there > 24 hours before they
were REJECTed. If they were processed before that and had
problems they were SKIPped (with no notification to the maintainer
and/or uploader).

dak's first commits were in 2000, and rolled out onto ftp-master.d.o sometime in 2001 or 2002 (I can't find an exact date for this). Since then, dak is also used on security.d.o, and on backports.org (fun fact for bpo people; the dak installation there is now up to date, and tracking git's tip).

So now that you know the history lesson, what specificially does dak do is the next question. Simply put, dak is the glue that binds the rest of the Debian's backends together; both britney and wanna-build/buildd depend on it. It handles management of uploads to the archive, handles stable release updates, as so forth. It is also the only Debian archive software that uses an actual database backend, and scales fairly well handling over 10,000 packages, and 12 architectures. Unfortunately, there are also a lot of issues with dak as it stands.

Sections of the code base have bitrotted over the years; legacy and legacy-mixed support have died, the import-archive function is shot (more so now than ever, see below), the test suite is non-functional (never a good sign), the docs are out of date, and in many places non-existant, doing a release (both point and full) requires editing the database and so forth.

In addition, dak, while written in python, is written in a fairly procedural style, and and some very ugly code in some places. For instance, the original Debian Maintainer code was handled by having the uid's in the database prefixed by dm: vs having a flag somewhere, and had some hardcoded variables like checking for "unstable", as well as quite a few bugs which caused interesting behavior when uploading to a non-unstable suite such as experimental or one of the proposed queues. (for those of curious, I recommend checking the dak git tree to see what the old DM code looked like, and then aside from the design, find the two major bugs which caused a lot of the weirdness with DMs). It should be stated that the last merge from redid the DM code and design sanely using the new update framework.

These issues have lead to the genesis of the dak v2 project, which is an attempt to replace dak with a module, rewritten from the ground up to be more secure and modular, although its not gotten very far as of writing. I personally don't believe that the current iteration of dak is so bad as scrapping and rewritting is necessary. Instead, I've been working to implement v2 features in dak by aggressive refactoring and cleanup, with the hope of negating the need for a rewrite.

So now thats out of the way, I bet you probably are interested in my .plan for dak. Well, lets go over I've implemented so far.

* An update database framework for dak, which will allow for easy database upgrade and migration, vs the "does it work yet?" approach to applying schema updates. Simply type dak update-db, and your done!

* 822 formatted output for queues (http://ftp-master.debian.org/new.822); this information is now used on DDPO pages

* Rewriting DM management code to have more of a brain than the previous implementation.

What's next on the TODO list

* Content file generation from the database (part of removal of apt-ftparchive, but thats another blog post ;-)).

Oh, as a side note to my current readers, my blog has changed names to "Notes from Underground", after one of my favorite novels, and futher in reference to exploring the mysterious underground that is Debian's backend code. We're also now on Planet Debian :-).

John Goerzen: Kansas Adventure

Today, Terah and I set out for some geocaching. Jacob s daycare was back in session (he goes twice a week), but we both had the day off. Jacob enjoys geocaching, but he does make it a lot slower. So we dropped him off at day care today, and headed off. We were also scouting out good places for future tent camping along the way. We didn t know exactly where we d manage to go, so I had downloaded over 100 geocaches to my new GPS, prepared for many options! Not long after we found our second cache (in Canton, KS), Terah asked, Did you hear that hissing from the tire? No . We were about 5 miles from town. I happened to have an air tank with me (because of a different tire with a slow leak). I shot some air in it, and we made it to Canton Service just fine. They fixed both tires, and my uncle who was there getting tire work done himself was quite surprised to see us pull in bright and early at about 9:00! After our tire was fixed, we headed northeast. We found some more caches, and drove around the two lakes near Herington, KS. We saw hundreds of geese perched on the icy lake and hiked a bit in the area to find a cache. Then it was on to Council Grove for lunch. I do believe this is the first time we have ever walked into a place that looks like a restaurant and only after we are seated realize that we re in a museum. Council Grove has an amazing historic downtown the most history per capita of any town in the west! the travel information AM station proudly proclaims, with 25 historic sites and a population of 2500. Got a chuckle at that one. We drove by the oldest continuously operating restaurant west of the Mississippi (it was closed), so we turned around and stopped at the Trail Days Bakery and Cafe that we had passed a few blocks back. We walked in the side door, into what looked like a meticulously-restored old house. We were seated at a table, given menus, and the waiter explained, By the way, you re eating in a cafe that s also a museum. Please feel free to look around, and don t miss the basement and upstairs, too! So it turned out that the Trail Days Bakery and Cafe is in the historic Terwilliger House. The house was about to be razed, when Shirley and Ken McClintock heard about it and tried to get some people interested in saving it. When nobody else stepped up, they did they formed a non-profit, and with a lot of hard work from themselves and others, managed to restore it from its state as a run-down gas station to its former beauty. They operate the cafe as a way to raise funds for the preservation of the house and the other historic buildings they have moved to the site to restore. Oh, and Shirley and Ken were our cooks and waiters today! We showed up there at about 1PM, right at the tail end of the lunch rush. Another couple happened to be there at about the same time. They were traveling across Kansas from west to east, specifically avoiding the interstates so they could see the small towns along the way. We got to talking about geocaching and their home town near Colorado. Then we got to talking to Shirley about the music CDs that they had for sale and the history of the place, and the Ken told us all about the Native American pictograph that they had discovered carved into the wood in the house. By the time we left, we had probably been there almost two hours. Oh, by the way, Terah had ham and beans ( just like mom used to make , she said), and I had what can be best described as a sloppy joe made out of bison meat. Both were good, but eating in this beautiful old house was even nicer. Then we drove down the road a bit to the old apothecary. Yes, it s still a drugstore in every sense of the word: you can get your prescriptions filled there, and they also still have the original soda fountain (dating back to 1920 if memory serves), serving up all the stuff you used to find in a drugstore. We chose somewhat boring items, I guess: Terah had a chocolate shake (the made-in-front-of-you-fresh kind), and I had a root beer float. So, what would have been a quick lunch in a different town turned into a few hours in Council Grove thanks to a very helpful leaky tire this morning that threw us off schedule! After that, a few more caches on the way back towards home. We picked up Jacob, and he and I found the last cache of the day which he, of course, loved. Then home. We only found 8 caches, but had a lot of fun.

Joey Hess: new year

I'm trying to work on having days that are somehow individually memorable this year. So far.. 0 (leap day) Finally tackled the chapter on monads. I'd read various explanations a year ago, but was swimming in syntax I didn't understand. After percolating for a year, and learning to read the syntax better, monads turned out to make very simple sense. (I can't say the same about Johnny Monad.) I had been meaning to write sometime about a method I used in ikiwiki to let expressions in a mini-language, that normally are evaluated to match a set of pages, instead be evaluated to explain why they succeed or fail. It's a cute technique, though hard to explain. Now I'm pretty sure it's just a monad. So I don't have to explain it! 1 Visiting Abram's falls this time of year, the canyon is in constant wintry shadow. The falls are not frozen, but have icicles twice my height, and there are rank upon rank of icicles all down the walls, an ice cathederal. It's a bright sunny day, but on the whole hike, I only get into the sunlight once, briefly, at the top of the giant steps. Then back into the shade. Back at my car, I'm suprised that it's only 3 pm, feels like it should be 5. Made a pecan pie with daddy's pecans and eggs. 2 A grey day with snow and worse. The paper's rss feed repeats "dozens^Whundreds of wrecks" over and over, as if to make up for there being no 60 point type. I'm reading Ted Nelson's book Geeks Bearing Gifts. The chapter summaries seem better than the actual book. And the on-demand printing makes me think I'm reading a poorly laid out web page, rather than something typeset. But I love that he goes all the way back to the invention of the alphabet and of hierarchical categorization and suggests all the basis for modern computers is arbitrary and/or wrong. Eating ginger duck downtown I look up and a pizza delivery guy has slid out of control right in front of me and crashed.

1 January 2009

Andrew Pollock: [tech] USB power switch?

I bought these USB powered lights from Woot! recently, with grand plans of using them with a continuous build/test/install rig to provide visual notification of when a build/test/install completed or failed or something. Somewhat to be expected for the price, they merely draw power from the USB port, and have a physical switch on each light. I want something software controlled though. There's something in /sys/bus/usb/devices/*/power/level that looked promising, but seems to be a red-herring (at least for non-devices. I was able to turn off a USB mouse and a Bluetooth adapter this way) What I'd like (and it probably exists, I just have to find it), is a USB device that presents itself to the operating system, and its sole purpose is providing pass-through power to a USB A-type receptacle on itself. This would then be manageable by the operating system. What I'm possibly trying to say here is a small, specialised, one port USB hub. Hmm... I'll have to see if I can borrow a USB hub from someone to test this theory. I've never had a need to own one.

Ana Beatriz Guerrero Lopez: New Year s proposal: look at your reported bugs!

Happy New Year everybody! I have a little New Year s proposal for you all, users and developers. Take a look to the bugs you have reported in Debian, this can be very easily done by browsing:
http://bugs.debian.org/cgi-bin/pkgreport.cgi?submitter=USER@DOMAIN.NET
where USER@DOMAIN.NET is the email address you used for reporting. Then update the bug reports information in the following way: Alternatively, you can look at the bugs of your favorite package and help the maintainer. Go to http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=PACKAGE replacing PACKAGE with the application name, look at the bugs and send a email to BUGNUMBER@bugs.debian.org with all the information you can gather about the bug: if you can reproduce it (and if yes, how), versions affected, also you can make a patch :) etc. Above, I only gave basic hints of how to interact with the Debian BTS, if you want to know more, read the documentation at http://www.debian.org/Bugs/.

Biella Coleman: 2008

When I return to PR, my blog tends to lie fallow. Between taking care of the house, outdoor distractions (like the very overgrown garden and the very enticing beach), and most especially visiting my mother, I turn away from the computer, from my analytical mind, from writing. But since we have edged into a new year, I thought I would spend a little bit of time ruminating on 2008, which was one of the most unforgettable for me. With each passing year, it seems that 12 months bleed right into the next 12 months. But within this swirl, there are a handful of years that retain their sharp edges (1992, 1996, 2005, 2005-2006 are the most memorable). 2008 now sits among those as it is the the year that a tube was placed into my mother s stomach and soon after she was taken from the hospital into a nursing home without even the chance to say goodbye to the dog who was her steadfast companion and the house, which was her home for over 20 years. Over the last 6 years while I have not written much about my mother and her Alzheimer s, I did so fairly consistently with at least 3 entries per year, that is until March 2008 when she was put in the nursing home. Soon after being admitted, I wrote one entry and since then have not had the heart to commit much to words, something of which I am ashamed of and have sworn I would write about at least once before another years passes us by. I don t have the desire to constantly write about my experiences with her but it seems to be that Alzheimer s is erased far too often from public view and I would rather not contribute to that type of very pervasive silencing either. The recipe for my silence has been made up of various ingredients. One was I was just really really busy. Last semester was frenetic so I often did not have an ounce of room/time to think, much less blog about such a difficult situation (and I spent a lot of time going back and forth to PR as well). Another is that I was trying to avoid the heartache that arises when you focus in, with some detail, care and attention, on something that is unavoidably painful. Each time I tried, I ultimately failed and told myself, I would do so later. Finally I was blogging less and less about these types of subjects so it just seemed a little out of place every time I tried to commit something to words. For me, one of the hardest things to accept and this probably fed into my silence is that I played a part in prolonging her life when I know she wanted out (with a capital O U and T). But at the time the feeding tube was placed in her, she was walking and talking and it did not seem right to refuse her food (and I hoped that with some food, she would then start to eat on her own as she can swallow just fine) not to mention that her caretaker (a devout Catholic) and my sister would have never at the time been ready to refuse the feeding tube and I was not exactly quite ready either. Well, what we did not foresee was that 5 days in the hospital did her in and when she left, she could no longer walk, she could barely talk, and yet due to the feeding tube, she gained back the dramatic weight that she had shed over a year so that her body at least looked far more alive than it had been for years thanks to the steady stream of nutrition being slowly pumped into her body. I just know she would not want to be alive under these conditions and yet at this point, there is not much I can do legally except refuse certain classes of treatments if she gets sick (such as respirator) or wait until she becomes completely vegetative and then go through the legal hoops, that ultimately may not be successful, to remove the feeding tube. It has been so hard for so many months that as I late I have been trying to approach the whole thing with at least one dash of Zen-like detachment (by which I mean an embrace/acceptance of suffering in this world) and just spend as much time as I can with my mother, which I did a lot over the summer and I am now doing this winter. I am most probably moving back over the summer as well as my sister is not faring all that well after being with her for so many years. Even though she no longer knows my name, or who I am, I can tell she notices my presence and there are days she even seems to be happy. In fact, over the summer, she had some pretty lively days when we could manage to joke about almost nothing. Those days were rare and precious and today they don t seem to happen at all (she did seem a bit excited that it was a New Year though I could not tell if she really knew what I was saying). Over the summer, generally I would climb into her bed and we would co-nap for a couple of hours. And then the worst were the days she was hysterical and crying, and the absolutely worst was when she was crying, pleading for her parents. Those were days that did not break my heart but my soul. Thankfully those days of hysterics seem to be happen less and less and my mother just seems to sleep a lot. I sometimes like to think she is like those really old cats or dogs who seem to spend interminable hours sleeping and resting and don t seem to be suffering all that much though I can still tell she is still in a bad mood from time to time. She also has a wonderful roommate, Ana, who also pretty advanced Alzheimer s though certainly not as bad as my mom. Unlike my mother, she is happy as a clam, so much so she is always saying things like Isn t this a great day? How wonderful the day is, etc. etc, which is a nice counterbalance to my mom! I sort of like that my mom s roommate is, personality wise, the polar opposite of my mother, who is not a fundamentally unhappy soul, but she was emotionally erratic one with quite a few peaks and valleys and this is still very much the case. Having Ana around (and her family) has transformed the way I have seen this illness and my mother s condition. I am certainly not thrilled that she is alive and in fact think how we end (or don t end) life is something we as a society should be ashamed of. I clearly want to see her released, freed like a bird from the cage of this world (my mother loved loved birds I think because they symbolized freedom), but spending time with Ana, who again seems quite content, made me realize how part of the Alzheimer s experience is rooted in one s personality. My mom has always been difficult and when she was sick but still quite functional, her personality made the illness difficult for her and those around her. She never really had much luck changing her karmic personality and it sure is not going to change now. But as I said she does seem to rest a lot. I just hope her last few months, possibly years, are if nothing else peaceful and tranquil.

Biella Coleman: 2008

When I return to PR, my blog tends to lie fallow. Between taking care of the house, outdoor distractions (like the very overgrown garden and the very enticing beach), and most especially visiting my mother, I turn away from the computer, from my analytical mind, from writing. But since we have edged into a new year, I thought I would spend a little bit of time ruminating on 2008, which was one of the most unforgettable for me. With each passing year, it seems that 12 months bleed right into the next 12 months. But within this swirl, there are a handful of years that retain their sharp edges (1992, 1996, 2005, 2005-2006 are the most memorable). 2008 now sits among those as it is the the year that a tube was placed into my mother s stomach and soon after she was taken from the hospital into a nursing home without even the chance to say goodbye to the dog who was her steadfast companion and the house, which was her home for over 20 years. Over the last 6 years while I have not written much about my mother and her Alzheimer s, I did so fairly consistently with at least 3 entries per year, that is until March 2008 when she was put in the nursing home. Soon after being admitted, I wrote one entry and since then have not had the heart to commit much to words, something of which I am ashamed of and have sworn I would write about at least once before another years passes us by. I don t have the desire to constantly write about my experiences with her but it seems to be that Alzheimer s is erased far too often from public view and I would rather not contribute to that type of very pervasive silencing either. The recipe for my silence has been made up of various ingredients. One was I was just really really busy. Last semester was frenetic so I often did not have an ounce of room/time to think, much less blog about such a difficult situation (and I spent a lot of time going back and forth to PR as well). Another is that I was trying to avoid the heartache that arises when you focus in, with some detail, care and attention, on something that is unavoidably painful. Each time I tried, I ultimately failed and told myself, I would do so later. Finally I was blogging less and less about these types of subjects so it just seemed a little out of place every time I tried to commit something to words. For me, one of the hardest things to accept???and this probably fed into my silence is that I played a part in prolonging her life when I know she wanted out (with a capital O U and T). But at the time the feeding tube was placed in her, she was walking and talking and it did not seem right to refuse her food (and I hoped that with some food, she would then start to eat on her own as she can swallow just fine) not to mention that her caretaker (a devout Catholic) and my sister would have never at the time been ready to refuse the feeding tube and I was not exactly quite ready either. Well, what we did not foresee was that 5 days in the hospital did her in and when she left, she could no longer walk, she could barely talk, and yet due to the feeding tube, she gained back the dramatic weight that she had shed over a year so that her body at least looked far more alive than it had been for years thanks to the steady stream of nutrition being slowly pumped into her body. I just know she would not want to be alive under these conditions and yet at this point, there is not much I can do legally except refuse certain classes of treatments if she gets sick (such as respirator) or wait until she becomes completely vegetative and then go through the legal hoops, that ultimately may not be successful, to remove the feeding tube. It has been so hard for so many months that as I late I have been trying to approach the whole thing with at least one dash of Zen-like detachment (by which I mean an embrace/acceptance of suffering in this world) and just spend as much time as I can with my mother, which I did a lot over the summer and I am now doing this winter. I am most probably moving back over the summer as well as my sister is not faring all that well after being with her for so many years. Even though she no longer knows my name, or who I am, I can tell she notices my presence and there are days she even seems to be happy. In fact, over the summer, she had some pretty lively days when we could manage to joke about almost nothing. Those days were rare and precious and today they don t seem to happen at all (she did seem a bit excited that it was a New Year though I could not tell if she really knew what I was saying). Over the summer, generally I would climb into her bed and we would co-nap for a couple of hours. And then the worst were the days she was hysterical and crying, and the absolutely worst was when she was crying, pleading for her parents. Those were days that did not break my heart but my soul. Thankfully those days of hysterics seem to be happen less and less and my mother just seems to sleep a lot. I sometimes like to think she is like those really old cats or dogs who seem to spend interminable hours sleeping and resting and don t seem to be suffering all that much though I can still tell she is still in a bad mood from time to time. She also has a wonderful roommate, Ana, who also pretty advanced Alzheimer s though certainly not as bad as my mom. Unlike my mother, she is happy as a clam, so much so she is always saying things like ???Isn t this a great day???? ???How wonderful the day is,??? etc. etc, which is a nice counterbalance to my mom! I sort of like that my mom s roommate is, personality wise, the polar opposite of my mother, who is not a fundamentally unhappy soul, but she was emotionally erratic one with quite a few peaks and valleys and this is still very much the case. Having Ana around (and her family) has transformed the way I have seen this illness and my mother s condition. I am certainly not thrilled that she is alive and in fact think how we end (or don t end) life is something we as a society should be ashamed of. I clearly want to see her released, freed like a bird from the cage of this world (my mother loved loved birds I think because they symbolized freedom), but spending time with Ana, who again seems quite content, made me realize how part of the Alzheimer s experience is rooted in one s personality. My mom has always been difficult and when she was sick but still quite functional, her personality made the illness difficult for her and those around her. She never really had much luck changing her karmic personality and it sure is not going to change now. But as I said she does seem to rest a lot. I just hope her last few months, possibly years, are if nothing else peaceful and tranquil.

Dirk Eddelbuettel: R/Finance conference in Chicago in April: Call for Papers

The following went out to the R-announce and R-SIG-Finance mailing lists a few days ago. The conference already has a very strong lineup of invited speakers, and we are now asking R / Finance users from both academia and industry to submit suitable one-page abstracts:
Call for Papers The Finance Department of the University of Illinois at Chicago (UIC),
the International Center for Futures and Derivatives at UIC, and
members of the R finance community are pleased to announce R/Finance 2009: Applied Finance with R on April 24 and 25, 2009, in Chicago, IL, USA Confirmed keynote speakers include:
Patrick Burns (Burns Statistics)
David Kane (Kane Capital)
Roger Koenker (U of Illinois at Urbana/Champaign)
David Ruppert (Cornell)
Diethelm Wuertz (ETH Zuerich)
Eric Zivot (U of Washington)
We invite all users of R in Finance to submit one-page abstracts or
complete papers (in txt/pdf/doc format). We encourage papers both on
academic research topics and related to use of R by Finance practitioners.
Presenters are strongly encouraged to provide working R code to accompany
the presentation/paper. Datasets need not be made public. Please send submissions to committee@RinFinance.com.
The submission deadline is January 31st, 2009.
Submissions will be evaluated and submitters notified via email on a rolling basis. Additional details about the conference will be announced as available. For the program committee:
Gib Bassett, Peter Carl, Dirk Eddelbuettel, John Miller,
Brian Peterson, Dale Rosenthal, Jeffrey Ryan
See you in Chicago in April!

31 December 2008

Clint Adams: Some art for 2008

Museum

Andrew Pollock: [tech] Goodbye Vonage, hello T-Mobile@Home

When we first moved to the US, I wanted to try and do the telecoms and Internet stuff as cheaply as possible, while still trying to be technologically "fun" as well. I elected to get the cheapest home phone line (local calls only) I could get with AT&T (then SBC) (which is still remarkably expensive) so that I could get DSL (which, while three times faster than what I'd had previously in Australia, was still not that fast). (I went for DSL over cable because I'd heard horror stories about Comcast's reliability, and also they weren't cool with running servers or inbound services, Sonic is, and is a great ISP). I chose Vonage for US long-distance, I think because I'd heard of them previously, and was interested in trying out VoIP. We initially used Vonage for calling Australia as well, until I played around with Engin, and then deployed Asterisk. Anyway, I've been a loyal Vonage customer for exactly three years. The truth is, we hardly make any US long distance calls. We've got friends in Phoenix (hi Craig and Sarah!) that we call infrequently. I guess there might be the odd cell phone that isn't considered a local call, but we tend to use our cell phones more than the home phone anyway... So we were a very cheap $14.99 a month for Vonage. So when I called T-Mobile to purchase a SIM card for the Android Dev Phone 1 I'd been recently given, the opportunity to have their T-Mobile @Home in place of Vonage, for an extra $9.99 on top of what I was paying for the cell phone line seemed like worthwhile cost saving. I have no attachment to the incoming number for the Vonage line, we give out the AT&T land line number to people as our "primary" home number. Later that day, Vonage announced they were increasing their monthly fee from $14.99 to $17.99, which made the decision seem all the more prodigious. I did a spot of research while I was waiting for the @Home box to ship to me, and it turns out that they have a wireless router and non-wireless router option. They hadn't specified what I was getting at order time, and I was hoping I'd get the non-wireless router, since I already had an access point I was perfectly happy with it. As luck would have it, I received the wireless router model (a Linksys WRTU54G-TM). I'd mentally prepared myself to be receiving just another Linksys RTP300, like what Vonage used, and so I was quite surprised by the differences in technology used. It's been a while since I tried to do any reverse-engineering of the Vonage ATA, but I think from memory, it was essentially that: an ATA. It talked SIP back to Vonage. My DSL provider gave me a few static IP addresses, so when I got it, I just allocated one for Vonage, and did a static NAT through my firewall to for it, and everything just worked. It was fairly apparent that the WRTU54G-TM was nothing at all like this (given it was also an access point). It takes a GSM SIM card (up to two in fact), which I presume has all of the provisioning information on it. I was initially worried that I was going to need to completely rejig my network to accommodate it. I guess the SIM card approach means there's no customer specific provisioning that presumably otherwise needs to be done to the device itself, and they can just ship vanilla devices. I presume the Vonage RTP300 had some sort of customer-specific configuration, because I never had to do anything. I briefly toyed with the idea of running two access points, and having a "guest" wireless network, but I am interested in reducing heat and power consumption in my linen cupboard, so I decided to try and just swap over to using the WRTU54G-TM as my access point, retiring my Linksys WAP54G. So that's exactly what I sat down to do last night. Sometimes in their efforts to make these things "simple", they end up making things more complicated. What I wanted to do was just plug the "Internet" side of the device into my internal network, have it get an IP address with DHCP, and then let me get on with configuring it. The "advanced" setup instructions talked about the box having a default IP address of 192.168.0.1 ("or try 192.168.24.1 if that doesn't work"). I figured the DHCP IP address would override that, so I was trying to hit the IP address I could see the unit had picked up from my DHCP server. No response from the HTTP server. I could see it replying to ARP requests, and I could see what appeared to be an IPsec NAT-T connection. After some fiddling around, I twigged that I was trying to manage it over the Internet port, and any device worth its salt was going to be very hardened out of the box on what it expected to be the raw Internet-facing side, so I plugged my laptop directly into one of the four Ethernet ports that it also had, and then I could hit the 192.168.0.1 IP address and access the management interface. It never occurred to me prior to fighting with getting the WRTU54G-TM configured, that the RTP300 might have been more than a black box, as I'd never tried plugging anything into the "inside" ports on it, mainly because I'd never intended to use it as a router or a switch. Out of the box, the WRTU54G-TM was configured to be a router, which I didn't need, and it was configured to be a DHCP server for 192.168.0.0/24, which I definitely didn't want. An interesting side-effect of putting it into bridging mode was the MAC address changed (to the one that was printed on the unit, which was not how out of the box it presented itself). I have no need or intention of plugging anything into the "inside" Ethernet ports on the WRTU54G-TM, as I have a separate switch for that, and indeed I run my wireless network on a different interface of my firewall to my wired network. Fortunately I was able to enable the management interface via the "Internet" interface. The added benefit of the device doing NAT-T is I don't need to allocate an IP address to it for the VoIP stuff it work, it all just works fine without it, so I've freed up an IP address, removed two devices from my linen cupboard, added one new one, and saved some money. Woot! Next, just because I can, I'm going to try and break into the RTP300 and see if I can reconfigure it as a general purpose ATA to talk to Asterisk. There's evidence it's possible. It's otherwise of no further use to me. Even if I get it working with Asterisk, it's not of a lot of use to me. Maybe I can send it to a family member, and they can call us over the Internet for free instead of for the cost of a call to Brisbane...

Russell Coker: Links December 2008

A teacher in Arizona steals Linux CDs from a student and then accuses a Linux distributor of being a criminal [1]. Even though she had used Linux in the past she didn t believe that software was free. Of course that implies that in the past she had performed actions that she believed were criminal. Neat Little Mac Apps interviews Marshall Kirk McKusick - he describes how the BSD Daemon logo was designed and one of his most significant bugs [2]. OurDelta.org offers MySQL builds with some extra features and support [3]. I was recommended to use their builds by Arjen Lentz of Open Query [4], as one of my clients is going to use the services of Open Query it seems best to use the Our Delta builds if only to get better support from Open Query. The extra features in the Our Delta builds seem interesting, but I m not sure that my client needs any of them at this time. The Global Guerilla blog reports on a man who single-handedly invaded the most heavily guarded power station in Britain and shut it down to protest against new coal power stations [5]. The entire blog is worth reading, the author has a lot of interesting ideas. PhpMyVisites is a free web site analytics system that competes with Google Analytics [6]. I haven t implemented it yet, but it looks promising. It seems that PhpMyVisites is not being updated any more (not even security updates) and the replacement is Piwik [11]. Andrew Lahde was a fund manager who made significant amounts of money by betting on the inability of US mortgagees to repay their debts, he wrote an interesting goodbye letter (Telegraph.co.uk) [7]. He now has a Wikipedia page which gives some interesting background to his career [8]. An Employee of the Financial Times is famous for flaming Andrew [9], I have submitted a comment pointing out that being famous for flaming someone who is more successful than yourself is nothing to be proud of and suggesting that he advocate his own political views when criticising those of others - I doubt that it will get through moderation. It s a pity that Andrew doesn t have a blog, I would like to read more from him. At CCC a paper by Alexander Sotirov, Marc Stevens, Jacob Appelbaum, Arjen Lenstra, David Molnar, Dag Arne Osvik, and Benne de Weger on how to crack the PKI infrastructure used for SSL signing was presented [10]. The root cause is some CAs still using MD5 even though it was broken a long time ago. Updated to note that Piwik is the replacement for PhpMyVisites.

30 December 2008

Julien Danjou: Rants about Lua

I've started using Lua some months ago, while looking for a more powerful way to configure awesome. At this time, around March 2008, Lua seemed to be the best language to integrate inside the core system of awesome. I still think that Lua was a good choice, but after 8 months, it shows some important drawbacks. I'll try to keep my explanation simple and to make you understand everything, even if you do not know Lua. I refer here to Lua 5.1 Design flaws Length operator Lua has a length operator on its objects, known as #. It can be used to get the size of various objects.
return #"lol" 3
This operator works for table, string, etc It's possible to define this operator by setting a __len meta-method on a userdata value. The problem is that you cannot redefine it on string or table objects, see:
> a =   "hello", "world"  
> return #a
2
> setmetatable(a,   __len = function () return 18 end  )
> return #a
2
Indeed, looking at the Lua core code:
     case OP_LEN:   
       const TValue *rb = RB(i); 
       switch (ttype(rb))   
         case LUA_TTABLE:   
           setnvalue(ra, cast_num(luaH_getn(hvalue(rb)))); 
           break; 
             
         case LUA_TSTRING:   
           setnvalue(ra, cast_num(tsvalue(rb)->len)); 
           break; 
             
         default:    /* try metamethod */ 
           Protect( 
             if (!call_binTM(L, rb, luaO_nilobject, ra, TM_LEN)) 
               luaG_typeerror(L, rb, "get length of"); 
           )   
             
           
       continue; 
      
You clearly see that tables and strings always use the internal length operator, never the __len meta-method. That's for me a design problem, which will cause more trouble. We'll see later. __index and __newindex metamethods Lua defines two useful metamethods, which are __index and __newindex. Both can be set on a table or any other object. __index will be called upon each read access to an undefined key on an object, and __newindex upon each write access. Example
> a =  
> setmetatable(a,   __index = myindexfunction, __newindex = mynewindexfunction  ) -- function are not defined, this is just an example
> a[1] = "hello" -- This will call __newindex metamethod
> return a[2] -- This will call __index metamethods
> return a[1] -- This will NOT call __index
The last line does not call __index meta-method because a[1] does exists. This is a problem when you want to use table as object, because sometimes you want to monitor access to the table elements. This can be easily worked around using a proxy system: you don't store things in the table you manipulate, but in another table.
> a =  
> realtable =  
> setmetatable(a,   __index = myindexfunction, __newindex = mynewindexfunction  ) -- function are not defined, this is just an example
Where meta-methods are something like:
function myindexfunction(table, key)
   return realtable[key]
end
function mynewindexfunction(table, key, value)
   realtable[key] = value
end
This way, our a table will always be empty, and realtable will have the data. At every read or write access to a, the meta-methods will be called. This is very convenient and widely used hack. But this has serious drawbacks: as we saw before, the length operator (#) cannot be redefined on a table. That means #a will always be 0, and you cannot get the table length anymore, except by defining another method or a special attribute. Also, Lua has several functions in the table library that are used to manipulate table in a easy way. The problem is that standard functions like table.insert or table.remove do raw accesses to the table. Meaning that if you do table.insert(a, 1, 1) it will insert the value 1 at the key 1 into a, without calling the __newindex meta-methods, breaking all your beautiful object-oriented model. Another solution is to use a userdata object, like done in the Lua newproxy function (which is under-documented). The problem is that it breaks all the other functions that are waiting for a table as argument, because they see a userdata, not a table. So this time table.insert is now more usable, which somehow fixes the problem, but not in the right way IMHO. However, this allows to use the __len meta-method. Development model The development model of Lua is, from my point of view, non-existent. There is no public version control system repository available, so there's no chance to really contribute to Lua. It seems only a defined set of people work on it and therefore, the development system is very closed to my eyes, in comparison of usual projects. Conclusion I still think Lua is a good choice, because it is very easy to integrate into any C program, and to expand to fulfill your needs. However, some bad design choices were made, and the poor and closed development model chosen does not allow to have a good overview of the future of Lua. This has been well stated by the authors themselves.

29 December 2008

Clint Adams: Oh, the triage

Thanks to Richard Hartmann, the number of bugs on the zsh package is down to 85. That's only about 100 too many.

David Moreno: Good looking Irb

Irb is a pain to work with when you don t know it enough. Fortunately, it can be configured extensively enough to make your Ruby interactive sessions much smoother. Pocahontas asked me to post my Irb configuration:
# ~/.irbrc
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:USE_READLINE] = true
IRB.conf[:SAVE_HISTORY] = 5000
IRB.conf[:HISTORY_FILE] = "# ENV['HOME'] /.irb_history"
IRB.conf[:PROMPT_MODE] = :SIMPLE
require 'irb/completion'
require 'irb/ext/save-history'
require 'pp'
# load rubygems and wirble
require 'rubygems' rescue nil
require 'wirble'
require 'utility_belt'
# load wirble
Wirble.init
Wirble.colorize
Which makes Irb to look much much better: irb But it is not only coloring the features you are getting, but also Readline support, command history saving, tab completion, libraries loaded by default, persistent history with Wirble, etc, etc. as you can see yourself on the very self-explanatory configuration file. Enjoy. Update: I have to thank my co-worker Galin for pointing me most of these neat features.

Adrian von Bidder: KDE vs. GNOME

No, I don't claim KDE is perfect. Especially the way the transition to KDE 4 is (not) being handled. (I don't mean within Debian, this is a KDE problem.) But beyond dumbing down the UI as even a very prominent Linux developer repeatedly commented on, Josselin Mouette just confirmed my decision to stay away from GNOME. Yes, there are other desktop environments and window managers, and I haven't done more than look at XFCE very briefly, but just now I'm quite happy with KDE 3.5, and am waiting for KDE 4 to become actually useable.

28 December 2008

Aigars Mahinovs: How to survive a coffee cup - guide for laptop (and cat) owners

Yesterday my cat spilled a full cup of hot coffee on my 2k$+ laptop. Today, there is no trace of the incident and the laptop is working perfectly again. This is partially thanks to luck, partially to Dell laptop engineering and partially to my instinctive actions within first 10 seconds of the incident. I will recap it here so that if you happen to have a mishap of such kind you would know what to do to save your laptop. The first thing I did is pick up the laptop (so that extra coffee from the table would not go into the vents at the bottom of the laptop) keeping the corner that was soaked with coffee downwards. With one hand I held the notebook and pressed and held the Power button to turn the laptop off as soon as possible. With the other hand I removed the power cord and tried to remove the battery as well. It took a couple seconds, but when that was done and the laptop was placed on a towel on the floor the time sensitive part was over. After that was the clean-up. Coffee from the table and floor (so that other things don t get soaked), coffee form the outside of the laptop (with a damp cloth), After that I disassembled my laptop down to removing the motherboard and checking it for damage. Where ever I found traces of coffee, I cleaned them up with cotton swabs and spirit (clean water would also work, but would require more drying time). After I cleaned and dried every part off with a fan, I put the laptop back together. It took around 2 hours (more like 4 because I had to ask my girlfriend to pick up a new screwdriver on her way home as I lost mine). Everything was working, except the keyboard. Bits of coffee got inside the keyboard and were shortening the wires so some lines of buttons were not working and some were activating other keys when pressed. On an advice from a fried, I took out the keyboard and washed it. I simply put the keyboard under a stream on running water and made sure that the water got into every possible and impossible opening. After 5 minutes of washing I got the hairdryer and proceeded to dry the keyboard. After an hour I put it in, but it still did not work, so I left it on a heating radiator overnight. After around 18 hours of drying the keyboard started working again. Oh and it was cleaner than it ever was :D Summary: Do not panic! Get water out of you laptop, get it turned off, disconnect power and remove the battery. If you manage to do all that in 10 seconds or less, you might have a chance of seeing your laptop boot up again.

Next.

Previous.