Search Results: "warp"

3 July 2011

Dominique Dumont: Generate a configuration editor from a config template file with Perl: lcdproc example

Hello Creating a configuration model for Config::Model can be a boring task: When a configuration system has a lot of parameters, a lot of details need to be specified to have a complete configuration validation tool. So, all tricks are permitted to make this task more bearable. Let s see how this can be applied to lcdproc. This project requires a configuration file that supports more than 40 drivers. Each driver has it own set of parameters for a total of about 250 parameters. That s a lot to specify.. Fortunately, LCDd.conf template file is written in a way which makes it relatively easy to parse and get all required information to build a model. All drivers are listed in this template file, most parameters have default values and legal values are written in comments in a uniform way. Hence this file (and comments) can be parsed to retrieve information required for the model. This blog will describe how this task can be implemented in Perl using Config::Model modules. The code will be slightly trimmed down to keep this blog (relatively) short. All initialisation code and error checks are removed. You can get the whole script on sourceforge. The main steps are:
  1. prepare a parser for LCDd.conf template
  2. parse LCDd.conf template
  3. prepare a LCDd model skeleton
  4. translate LCDd.conf template information in a format suitable to create a model.
  5. Write the resulting LCDd model
First, here s the necessary incantation to start properly a Perl program:
use strict;
use warnings;
Then load all required libraries. Their use will be described later:
use Config::Model;
use Config::Model::Itself 1.225;
use Config::Model::Backend::IniFile;
use 5.10.0;
use IO::File;
use IO::String;
Perform some initialisation to avoid upsetting the logging system:
use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init($WARN);
Let s also initialize a model object that will be very useful later:
my $model = Config::Model->new();
Now we can really start the fun part. Step 1: Create a parser for LCDd.conf (INI file)
Problem: LCDd.conf comments must also be analysed to get more semantic information. The comments must be retrieved and associated with the INI classes and parameters found in this file. Fortunately, Config::Model::Backend::IniFile is able to associate comments with the relevant parameters. But Config::Model::Backend::IniFile must store its values in a configuration tree. So let s create a model suitable for LCDd.conf template that accepts any INI class and any INI parameter Dummy::Class is used to store any parameter found in an INI class. The accept keyword with .* regular expression means that any INI parameter will be accepted in each INI class.
$model->create_config_class(
  name   => 'Dummy::Class',
  accept => [
    '.*' =>  
       type => 'leaf',
       value_type => 'uniline'
        ,
    ],
);
Now the Dummy model must provide a configuration class to hold all INI classes:
$model->create_config_class(
    name   => 'Dummy',
    accept => [
       '.*' =>  
           type => 'node',
           config_class_name => 'Dummy::Class'
        ,
    ],
);
Note that an INI backend could be specified directly here. But, some useful parameters are commented out in LCD.conf. Some some processing is required to be able to create a model with these commented parameters. See below for this processing. Step 2: Parse LCDd.conf Now the dummy configuration class is created. Let s create a configuration tree from this dummy class to store the data from LCDd.conf
my $dummy = $model->instance(
    instance_name   => 'dummy',
    root_class_name => 'Dummy',
)-> config_root;
Now, read LCDd.conf:
my $lcd_file
  = IO::File->new('examples/lcdproc/LCDd.conf');
my @lines    = $lcd_file->getlines;
And perform the pre-processing on LCDd.conf mentioned above. Just un-commenting commented parameters is required:
foreach (@lines)   s/^#(\w+=)/$1/  
Store the pre-processed LCDd.conf in a IO::Handle usable by INI backend
my $ioh = IO::String->new( join( '', @lines ) );
Create an INI backend to read the data from pre-processed LCDd.conf and store it in the configuration tree:
my $ini_backend = Config::Model::Backend::IniFile
  ->new( node => $dummy );
$ini_backend->read( io_handle => $ioh );
Step 3: Prepare LCDd configuration model Your attention please. You may remember that we invoked instance on object to create the dummy configuration tree to hold LCDd.conf data. The instance method used the Dummy configuration class. Now, we must invoke instance again on object. But this time, instance will use Config::Model::Itself. This model is Config::Model s way of eating its own dog food. The configuration tree created there will be able to hold LCDd model. Hence the root of this special configuration tree will be called meta_root to avoid confusion with the other configuration root defined above (for the Dummy model). Still with me? Good, let s create this meta tree that will contain LCDd model:
my $meta_root = $model->instance(
    root_class_name => 'Itself::Model',
    instance_name   => 'meta_model',
) -> config_root;
Create the main LCDd configuration class and store the first comment from LCDd.conf as class description:
my $first_comment = $dummy->annotation ;
$meta_root
  ->grab("class:LCDd class_description")
  ->store( $first_comment );
Append my own text in this description:
my $extra_description =
    "Model information extracted from template /etc/LCDd.conf"
  . "\n\n=head1 BUGS\n\nThis model does not support to load "
  . "several drivers. Loading several drivers is probably a "
  . "marginal case. Please complain to the author if this "
  . "assumption is false";
$meta_root->load(
     qq!class:LCDd
        class_description.="\n\n$extra_description"!
);
Add legal stuff in the model:
$meta_root->load( qq!
  class:LCDd
    copyright:0="2011, Dominique Dumont"
    copyright:1="1999-2011, William Ferrell and others"
    license="GPL-2"
!
);
Add INI backend so configuration object created from LCDd model will be able to read user s INI files:
$meta_root->load( qq!
  class:LCDd
    read_config:0
      backend=ini_file
      config_dir="/etc"
      file="LCDd.conf"
!
);
Note that all the load calls above could be done as one call. They were split for better clarity. Step 4:Extracting LCDd.conf information Now that all information from LCDd.conf template file is stored in $dummy configuration tree, it s time to use this information to enhance the skeleton of LCDd model created above. Let s first find all the INI classes defined in LCDd.conf:
my @ini_classes = $dummy->get_element_name;
Now before actually mining LCDd.conf information, we must prepare several subs to handle them. This is done using a dispatch table:
my %dispatch;
First create the default entry which will be used for most parameters. This subs is passed: the INI class name, the INI parameter name, the comment attached to the parameter, the INI value, and an optional value type. It will return a string describing a model for simple elements. For instance: class:"LCDd::MD8800" element:Device type=leaf value_type=uniline default="/dev/ttyS1" description="device to use [default: /dev/ttyS1]" Here s the subroutine invoked by default. Let s create a an anonymous subroutine and store it in the dispatch table:
$dispatch _default_  = sub  
    my ( $ini_class, $ini_param, $ini_note,
         $ini_v, $value_type ) = @_;
    $value_type  = 'uniline';
Now, prepare a string that will be used later to create the ini_class model. This string uses Config::Model s serialisation format described in Config::Model::Loader:
    my $load = qq!class:"$ini_class"
                  element:$ini_param type=leaf !;
Get semantic information from LCDd.conf template comments (written between square brackets):
    my $info = $ini_note =~ /\[(.*)\]/ ? $1 : '';
    $info =~ s/\s+//g;
Use this semantic information to better specify the parameter:
    $load .=
        $info =~ /legal:(\d+)-(\d+)/
           ? " value_type=integer min=$1 max=$2"
      : $info =~ /legal:([\w\,]+)/
           ? " value_type=enum choice=$1"
      :    " value_type=$value_type";
    if ( $info =~ /default:(\w+)/ )  
        # specify upstream default value
        # if it was found in the comment
        $load .= qq! upstream_default="$1"!
           if length($1);
     
    else  
        # or use the value found in INI
        # file as default
        $ini_v =~ s/^"//g;
        $ini_v =~ s/"$//g;
        $load .= qq! default="$ini_v"!
           if length($ini_v);
     
The model (in serialised format) is ready, let s return it and exit the subroutine:
    return $load;
 ;
Now let s take care of the special cases. This one deals with Driver parameter found in INI [server] class. This sub will create a string for an enum element. The possible values of the enum are extracted from the comment found in the LCDd.conf file:
$dispatch "LCDd::server" Driver  = sub  
    my ( $class, $elt, $info, $ini_v ) = @_;
    my $load = qq!class:"$class"
                    element:$elt
                      type=leaf
                      value_type=enum
    !;
    my @drivers = split /\W+/, $info;
    while ( @drivers
            and ( shift @drivers ) !~ /supported/ )  
      # nothing, the work is done by shift operator
      # in loop test to skip all words in $info until
      # 'The following drivers are supported:'.
      # ok, that's a hack
     
    $load .= 'choice='
          . join( ',', @drivers ) . ' ';
    return $load;
 ;
This sub invokes the default sub and add a small feature to the model to ensure that DriverPath ends with / . This is ensured by the match="/$" snippet:
$dispatch "LCDd::server" DriverPath  = sub  
    my ( $class, $elt, $info, $ini_v ) = @_;
    return   $dispatch _default_ ->(@_)
           . q! match="/$" !;
 ;
Likewise, this sub invokes the default sub with the optional 4th parameter that forces the value_type of the element. In this case, we enforce an integer element:
 $dispatch "LCDd::server" WaitTime 
 = $dispatch "LCDd::server" ReportLevel 
 = $dispatch "LCDd::server" Port 
 = sub  
    my ( $class, $elt, $info, $ini_v ) = @_;
    return $dispatch _default_ ->( @_, 'integer' );
   ;
This sub returns a string for a list element with default values:
  $dispatch "LCDd::server" GoodBye 
= $dispatch "LCDd::server" Hello 
= sub  
    my ( $class, $elt, $info, $ini_v ) = @_;
    my $ret = qq( class:"$class"
                    element:$elt
                      type=list
                ) ;
    $ret .= 'cargo type=leaf
             value_type=uniline - ' ;
    $ret .= 'default_with_init:0="\" '.$elt.'\"" ' ;
    $ret .= 'default_with_init:1="\" LCDproc!\""';
    return $ret ;
 ;
Now that the dispatch table is ready, let s really mine LCDd.conf information. First handle all INI classes in the foreach loop:
foreach my $ini_class (@ini_classes)  
Let s retrieve parameters for this INI class from the LCDd.conf template:
  my $ini_obj = $dummy->grab($ini_class);
This will be the name of the lcdproc driver configuration class (e.g. LCDd::imonlcd):
  my $config_class   = "LCDd::$ini_class";
The configuration class will also be created in a serialised format. Let s create config class in case there s no parameter in INI file:
  $meta_root->load(qq!class:"LCDd::$ini_class"!);
Now, loop over all INI parameters and create LCDd::$ini_class elements:
  my @all_ini_params = $ini_obj->get_element_name ;
  foreach my $ini_param ( @all_ini_params )  
Retrieve the value provided in template LCDd.conf:
    my $ini_v = $ini_obj->grab_value($ini_param);
Retrieve the comment attached to the value provided in template LCDd.conf:
    my $ini_comment
      = $ini_obj->grab($ini_param)->annotation;
    # escape embedded quotes
    $ini_comment =~ s/"/\\"/g;
Retrieve the correct sub from dispatch table:
    my $sub = $dispatch $config_class $ini_param 
              $dispatch _default_ ;
Run the sub to get the model string:
    my $model_spec
      = $sub->( $config_class, $ini_param,
                   $ini_comment, $ini_v );
Attach the comment from LCDd.conf as class description:
    $model_spec .= qq! description="$ini_comment"!
      if length($ini_comment);
Then, last but not least, load class specification in the model, and end the loop aroung INI parameters:
    $meta_root->load($model_spec);
   
Now create a an $ini_class element in LCDd class (to link LCDd class and LCDd::$ini_class):
  my $driver_class_spec = qq!
    class:LCDd
      element:$ini_class
  ! ;
Since server and menu are not drivers, they have a special treatment:
  if (   $ini_class eq 'server'
      or $ini_class eq 'menu' )  
    $driver_class_spec .= qq!
      type=node
      config_class_name="LCDd::$ini_class"
    ! ;
   
Here s the treatment for LCDd drivers. Setup the model with a warped node so that a driver configuration class is shown only if the driver was selected in the [server] class:
  else  
    $driver_class_spec .= qq!
      type=warped_node
      config_class_name="LCDd::$ini_class"
      level=hidden
      follow:selected="- server Driver"
      rules:"\$selected eq '$ini_class'"
        level=normal
    !;
   
Now we can load the LCDd driver model in meta root:
  $meta_root->load($driver_class_spec);
 
Step 5: save LCDd model Still with me ? Good. Here s the last part, now that the model was created in memory, let s save it in files. Config::Model::Itself constructor returns an object to read or write the data:
my $rw_obj = Config::Model::Itself
     ->new( model_object => $meta_root );
say "Writing all models in file (please wait)";
$rw_obj->write_all(
    model_dir => 'lib/Config/Model/models/'
);
That s it. Once this script is run, the directory lib/Config/Model/models/ contains a bunch of files: You can see the resulting editor in my first blog on lcdproc. Conclusion and future steps (with you?) As mentioned at the end of this blog, the result of this model generation process is far from perfect, because the information retrieved from LCDd.conf template are not complete for this task (which is normal since these comments were targeted for users). Now, I d really like to discuss with project developers to improve configuration template to generate better models. For project owner, such an improvement would give them: Please leave a comment on this blog (or send a message to config-model-users at lists.sourceforge.net) if you are interested in configuration tool generation for a project you contribute to. All the best

5 November 2010

Vincent Sanders: Keeping kindling dry

I, along with a great number of people I know, now posses a 3rd generation Kindle. It seems Amazon have found a feature set and price point which makes this device a winning solution.

My bookshelf complete with covered kindle
I did look at a huge number of alternatives like the Sony PRS600 and others but they were all more expensive than the 110 for the Kindle and did not have enough features to make a compelling argument for spending more.

Yes it has DRM. Yes it "only" supports PDF, MOBI and mp3. Yes it will not win any style or usability awards. But I went into this eyes open the device is "good enough".

The device lets me read books from a reasonable display. The integration with amazon.com is so seamless it poses a serious danger to my bank account. I should expand on that last point :-) Amazon have got the whole spending money for a book thing executed so well that you do not think twice about a couple of pounds here and there, this soon adds up. I have set myself a rigid budget.

My main complaints are really just niggles:

  • Another different USB connector! Wahh, I thought everyone had agreed on mini USB? seems that I now have to have yet another lead for micro USB

  • The commercial book selection is a bit limited and missing a surprising number of popular titles. Some of this appears to be the publishers and authors simply clinging to their old business model. I fear some of them might not survive and early indications are they are behaving like the music industry did...Guys you are selling an infinite good a scarcity model is going to fail!

  • The price of some of the books is absurd...they are asking hardback prices for the electronic edition! Seriously? how on earth can that possibly be justified? I can see that a hardback book with its print run could cost 5 per physical item (going from hulu print on demand prices as a worst case) plus shipping and stocking fees. So how can you possibly justify charging the same price for a pile of bits where none of that applies? Also the pile of bits cannot be lent or sold, not impressed.

  • eBook formatting is generally dreadful. I do not know who is mastering these books but they need to do a better job. If they tried to pull this in the physical editions they would get a seriously large number of returns.

  • I still have to pay for whispernet delivery fees even though, because its the wi-fi model, I am providing the bandwidth myself. I can see that differentiating between 3G and wi-fi delivery is a bit hard for them though.
However my one and only real complaint with the offering as a whole is the astronomical asking price for the leather cover. The cover is currently 25% of the price of the kindle itself! ( 30 cover 110 kindle) which is just silly. It is a pretty nice cover and the clever clip attachment means it does offer an integrated solution to protecting your kindle, but not 30 nice.

Kindle in a sock cover
So my lovely wife (her kindle was bought with the cover) made me a sock for mine. This is great for casual round the house usage to stop me scuffing the screen but was a bit lightweight for protecting the kindle when out and about.

One day last week I had an idea. I would make my own protective cover by crafting something I had wanted to do for ages. And the (unoriginal I am sure) project of a hollowed out book for housing my kindle was implemented.


My hollowed out book kindle cover
A quick Google later and I had a set of plausible instructions to follow. I used possibly the most out of date book ever (published 1981) on electronic test equipment, partly because it was a ex library sell off book which cost 10pence back in 1995 but mainly because it was the right size to just enclose the kindle without adding to much size.

I learnt a couple of things doing this:
  • Do not let your pva (white) glue mix get too runny, you want it fluid enough to be easily absorbed but not watery - this is important because otherwise the paper absorbs too much water and crinkles
  • Do not use a book where the binding has gone bad already and select a "clean" book. The spine of this book was yellowed and cracking before I started. This means the book spine simply cracks open at the hollowed out bit and it is very obvious.
  • Work out where the "solid" part at the back is going to be and treat that separately so you get a nice solid base at the back of the hole. In mine its not all stuck together and is a bit wavy. Do be sure you left enough depth for the kindle though.
  • Take your time and be careful with the glue, it is amazing how obvious even a simple splash of glue in the wrong place is. Use a small brush for this a paint brush is fast but sloppy.
  • Measure carefully and cut only a few pages at a time, it takes a bit longer but looks much better. Also I did not drill the corners of my hole which means they are a little scruffy.
  • Use the sharpest thinnest knife you can, this really helps. I started with a small stanley knife but switching to my hobby scalpel gave much better results.
  • If you have some, use woodworking clamps to clamp a bit of timber (I had some offcuts of shelving) around the book to compress it while the glue dries. Do not clamp the spine if you can avoid it. This method ensures:
    1. Heavy things do not fall off the book while it dries.
    2. An even strong pressure is applied.
    3. The book does not warp or bend while the glue dries
All in all I kinda like the results and I think I will try again with a more modern book where the spine is not so broken to begin with.

21 October 2010

Axel Beckert: New upstream versions of xrootconsole and keynav in Debian Experimental

I recently uploaded new upstream versions of two neat small X tools to Debian Experimental: Both packages introduce several new features and I d be happy if users of these packages in Debian Sid or Debian Sid users curious about them could test the versions in Debian Experimental. xrootconsole 0.6 + patches xrootconsole saw no love since 2006 with the last maintainer upload having been in 2002. Nevertheless it never got kicked out of Debian just because of this. The package had been forcibly orphaned just less than a year ago. So it s no big wonder that this new upstream version I packaged was released already back in 2004. :-) But besides packaging a new upstream version, bumping Standards-Version and debhelper compatibility, fixing tons of lintian warnings and some bugs, I also added two patches which add new features not (yet) available upstream: Of course I informed upstream about these feature patches, but I haven t got any feedback yet. But I got feedback from Julien Viard de Galbert, and he ll join me in packaging xrootconsole as co-maintainer. keynav 0.20101014.3067 I adopted the Debian package of keynav recently, subscribed to the keynav mailing list (well, it s a Google group), got a nice welcome mail from the very friendly upstream developer Jordan Sissel who offered to help with any keynav issues. I told him what features I d like to see in keynav to fit better the setup where I m using it. And just a few days later there was a new upstream release including both features I suggested, some more neat new features, and one bug fix. Jordan Sissel writes in the upstream changelog (emphasis and italic text by me): Both packages will be reuploaded to Debian Sid (Unstable) after the release of Debian Squeeze (currently testing ).

6 September 2010

Robert Millan: Debian Installer with ZFS

Long time no see Not much hacking in the last few months. Not much ranting either (some of you I m sure will appreciate ;-). Anyway, I recently grew excited to learn that ZFS is coming to Debian. I decided to bite the bullet, patched the missing bits in GRUB and Parted, a few small changes in D-I and there s now a modified Debian Installer with ZFS support for you to play with. Enjoy! Note1: I didn t have time or interest in warping D-I into the N:1:M model used in ZFS. Instead, this installer assumes each zpool has exactly one device and exactly one filesystem. However, you can later add more devices ( zpool attach ) or create new filesystems in the same pool ( zfs create ). Note2: Don t ask for i386, it was intentionally left out. ZFS is designed with modern CPUs in mind. It can work on i386 with special tuning but I don t want to encourage users to do this unless they re well aware of what they re doing.

4 August 2010

Andrew Pollock: [life] Zoe at 3 months

Again, there's been this surreal time warp effect. 3 months has passed, and it feels like both a long time and a blink of an eye. It more feels like a long time though. I've mostly forgotten what it was like before Zoe came along. Zoe is growing well. She weighs around 11 lbs 11 oz (5.3 kg), and I swear she's getting very long. When I'm holding her in my arms, there's legs everywhere. She started being able to roll from her stomach onto her back at 2 months, and her neck strength is pretty good now. I guess her next significant milestone will be being able to sit up properly. When she's on her tummy, she can prop herself up on her elbows and look around. She smiles all the time. We had a few nights of 8 hours of sleep, then everything went completely out the window, and we had about a week of very disrupted sleep at night. I think she's starting to settle into a routine now though, with a few 5 hour stints the last few nights. Her US passport arrived yesterday. We still need to get everything together to lodge her Australian citizenship application, which is the first step towards getting her an Australian passport. Sarah's back studying now (two subjects this semester), which is proving to be a bit of a juggling act. Zoe with her shiny new US passport

9 March 2010

John Goerzen: Review: The Future of Faith by Harvey Cox

I know I ve been on something of a religion streak on the blog of late, and this will be the last such post for awhile. I first hear of Harvey Cox s book The Future of Faith during an excellent hour-long interview with NPR s Diane Rehm. It was intriguing enough that I bought the Kindle edition of the book and read it. The title of the book is both very accurate and rather misleading. A lot of the book and, to me, the most fascinating parts of it focus on the history of faith. Cox s repeated point is that we are only now regaining a notion of faith that the earliest Christians had, and it is a notion that happens to be compatible with modern science and incompatible with fundamentalism and intolerance in all its stripes. Throughout this post, it should be understood that quotes or passages are from the book. Cox is so quotable that a good chunk of this review will be showing you some of his quotes, with a bit of discussion around them. I very much enjoyed this book, and highly recommend it. Faith vs. Belief
It is true that for many people faith and belief are just two words for the same thing. But they are not the same and it is important to clarify the difference. Faith is about deep-seated confidence. In everyday speech we usually apply it to people we trust or the values we treasure a matter of what the Hebrews spoke of as the heart. Belief, on the other hand, is more like opinion. We often use the term to express a degree of uncertainty We can believe something to be true without it making much difference to us, but we place our faith only in something that is vital for the way we live.
This is an important distinction, and if you stop and think about it, Cox is arguing with a common notion about faith almost from page 1. Faith isn t about intellectual assent to a set of propositions. It s about what we hold dear, what we think works for us in life. Creeds
Creeds are clusters of beliefs. But Christianity is not a history of creeds. It is the story of a people of faith who sometimes cobbled together creeds out of beliefs. It is also the history of equally faithful people who questioned, altered, and discarded those same creeds But both the doctrinal canons and the architectural constructions are means to an end. Making either the defining element warps the underlying reality of faith.
Cox here reinforces the point that Christianity isn t about believing certain statements, and it isn t even about a literal (or not) reading of the Bible. It s what C. S. Lewis talked about as the inward transformation in onesself. Creeds, such as the Nicene Creed, are rather irrelevant to him. Cox separates the history of Christianity into three periods: the age of faith, stretching from the time of Jesus only a few centuries until Constantine; the age of belief, stretching from Constantine until the 20th century; and the age of the spirit, now dawning. During the age of faith, their sharing in the living Spirit of Christ united Christians with each other, and faith meant hope and assurance in the dawning of a new era of freedom, healing, and compassion that Jesus had demonstrated. Cox makes the point that doctrinal questions just weren t all that important back then, and though differences existed, they weren t considered to be fundamental to the religion. Confidence in Christ was their primary orientation, and hope for his [earthly] Kingdom their motivating drive. Further, he argues that the age of the spirit is a return to this earlier age, albeit with modern twists.
Christianity is growing faster than it ever has before, but mainly outside the West and in movements that accent spiritual experience, discipleship, and hope; pay scant attention to creeds; and flourish without hierarchies. We are now witnessing the beginning of a post-Constantinian era.
Cox describes a person that described himself as a practicing Christian, not always a believing one. He suggests that the belief/non-believer statement is a disservice to Christianity and to other religions. He then quoted a Catholic bishop as saying: The line between belief and unbelief runs through the middle of each one of us, including myself, a bishop of the church. In other words, The experience of the divine is displacing theories about it. Faith and Belief in Bible reading
Creation myths such as the first chapters of Genesis were not primarily composed to answer the how or when questions. They are not scientific accounts, even though their poetical language, when read literally (which is always a mistake), may sound that way. Rather, they grapple with the linked mysteries of both why there is a universe and what our place in it is They are more like lyrical cantatas, symphonies of symbols through which humans have tried to make sense of their place in the world This is where the distinction between faith and belief is vital. These stories are literally not to be believed. They are, rather, artifacts human beings have crafted to try to wring some meaning from the mystery. They are not themselves the mystery.
I liken this to Michael Crichton s novel Jurassic Park. If you were to read it 1000 years in the future, it might not have been conveniently shelved above the word fiction. Would a reader in the future know that it was not meant to be a literal description of facts? I think sometimes we make this mistake when we read the Bible. Note, though, that although we all understand that Jurassic Park wasn t meant to be a literal description of facts, it seems to have been valued by quite a large part of society. And it didn t even address big mysteries. Cox argues against ridding ourselves of the creation myths, suggesting that they are an important reminder that we are similar to humans who grappled with the same big questions centuries ago as we do today.
The ill-advised transmuting of symbols into a curious kind of facts has created an immense obstacle to faith for many thoughtful people. Instead of helping them confront the great mystery, it has effectively prevented them from doing so the objective knowledge science rightly insists on is not the only kind of knowledge human beings need Faith, although it is evoked by the mystery that surrounds us, is not the mystery itself.
Constantine and the Age of Belief
One of the most devastating blunders made by the church, especially as the Age of Belief began, was to insist that the Spirit is present only in believers.
Cox spends a lot of time covering the very interesting topic of how and why the church moved to the Age of Belief. His central thesis is that money, power, and prestige were primarily responsible, and that an unrighteous collusion between bishops and Constantine, each using Christianity for their own purposes, finally made it happen. This is very interesting stuff, but this post is too long already, so I will not spend a lot of time on it. I found the Council of Nicea to be particularly interesting, considering that the Nicean Creed came about partially by exile or execution of those Christians that disagreed with it. Cox also points out that there never was a single early Christianity ; there were many, and the idea of heresy was unknown.
The time is ripe to retrieve the term Way for Christianity and followers of the Way for Christians. It is at once more accurate, more original, and more contemporary than believers.
To the future Cox describes attending a meeting of the church in Hong Kong in 2003, and uses it as a metaphor for the future of faith:
Their idea of interfaith dialogue was to work with their fellow Asians of whatever religion to advance the Kingdom that Jesus had inspired them, as Christians, to strive for, regardless of what the others called it. They were neither fundamentalist nor modernist. They seemed more attuned to the element of mystery at the core of Christianity and to its vision of justice. They were also clearly impatient with many of the disputes that preoccupy the different wings of the American churches.
Conclusion I found this book to be both enlightening and informative. I highly recommend it, even if you disagree with some of Cox s conclusions. It is a fascinating view into how the world s largest religion evolved over the years, and a candid look at the mistakes it has made in that time.

20 April 2009

Adeodato Sim : Five films (#5)

Ok, here we go again. I do hope somebody, somewhere is finding these posts of some use. *g* Isaac watched Love Actually recently, and I oooh ed quite a bit when he told me, because that movie has one of my favourite or should I say powerful scenes of all times for me, and recalling it brings me instant joy and often instant tears. I think these three (spoiling) minutes are so powerful because, albeit they are fully anticipated for the spectator, they come as a complete surprise to both protagonists (obviously to her, but also to him, given the dialog that takes place once she gets down the stairs; that tiny dialog is in fact the most powerful bit of it all).

5 March 2009

Matt Brubeck: 5 Mar 2009

Async Map and Fold in JavaScript My latest experiment is an implementation of asynchronous/parallel "map" (and other array functions) in JavaScript and Oni. Oni is a "structured concurrency language" embedded in JavaScript. For my source code and commentary, see oni-map at GitHub. You can leave comments at GitHub too. All this time reading Real World Haskell must really have warped my brain if a simple testing framework for a JavaScript program has got me thinking about higher-order functions and concurrency semantics...

25 November 2008

Isaac Clerencia: The coolest IP on the net

My workmate Josh just discovered this :P isaac@cooper:~
% host 69.69.69.69
69.69.69.69.in-addr.arpa domain name pointer the-coolest-ip-on-the-net.com.

3 November 2008

Isaac Clerencia: Not again

Every Democrat was pretty sure Al Gore was going to win in 2000. Most polls said John Kerry was going to win in 2004. And yet both times they managed to snatch defeat from the jaws of victory. Just remember how you felt then and try your best so it doesn’t happen again. There is so much at stake … the US and the world can’t afford 4 more years of a Republican US President. Even if the GOP seems to be defeated, shattered and panicking, Republican voters always end up voting for their guy on election day, while Democrats have great problems closing the deal. It has to be different this time. We need Obama to win tomorrow, and we need him to win big. And a Democratic wave to get a filibuster-proof Senate majority and a comfortable victory in the House of Representatives, so they can enact a progressive agenda in the upcoming years and restore some of the damage from the last two Bush terms. We also need a solid ‘no’ to Proposition 8 in California and similar ones in other states, so no excuse to stay at your place just because you are in one of the bluest states. I would like to ask you to do your best tomorrow, but probably Larry Lessig does a better job at it. Once we are past this, the hard work starts, trying to hold every elected representative accountable, draft better candidates for future elections, spot DINOs, …, but for now, let’s focus on tomorrow. I am hoping for the best, and I wish I could do more about it, but it’s up to you Americans. Do the right thing and leave everything on the road, you don’t want to regret it tomorrow.

23 September 2008

Isaac Clerencia: The end of the brick era

Just read this Techcrunch post about the Android/Google/HTC/T-Mobile phone and loved the last paragraph:

But remember, in the end this is not really about Android versus the iPhone. It s about Web phones versus the brick in your pocket. Simply matching the iPhone on many of these features especially Web browsing and email is going to be enough to help redefine the mobile market. The table stakes have just been raised. From now on, phones need to be nearly as capable as computers. All others need not apply.
I welcome our new cool future phones :P

18 September 2008

Isaac Clerencia: Sketching words

Some months ago I came across Sketch Engine. Sketch Engine is a website that offers a collection of pre-loaded corpora in several languages and the ability to automatically extract collocation information from them among other things. You can get a 30-day free trial account if you want to check it out, the point is that I thought it was really cool, but it was a bit pricy, 55 euros/year for an individual and 1080 euros/year for a site (up to 50 employees and students) and these were the academic licenses!!! And I don’t even have any real need for it :P So I thought it would be an interesting project to do something similar, albeit just focusing in the ‘word sketching’ part, as described in this paper. After a weekend I got it working although I didn’t devote any second to make it look good as you can appreciate: Collocations and other stuff. For now only the corpus of the state of the union addresses is loaded, with almost 400000 words. You can select that corpus, click on sketch and get the sketch of any word, for example, the ‘word sketch’ for problem. We can see that the adjective used more times with ‘problem’ is ’serious’, although if we look at the relative frequency it’s ‘complex’. The verb which has ‘problem’ as object more times is ’solve’ followed by ‘approach’, ‘address’ and ‘deal’. You can also click on the numbers to see the actual sentences in which these words appear, for example, ’serious problem’. So how does it work? First of all it does part of speech tagging using Apertium. Once the text is POS-tagged we apply a set of ‘regular expression’-like rules to identify the relation between words, such as:

*DUAL
=a_modifier/modifies
2:[tag=adj] [tag=n] 0,2 1:[tag=n] [tag!=n]
This rule expresses the relation between adjectives and the nouns they modify, matching sentences like ‘the red ball‘ and ‘the red football ball‘. Each relation is stored in the database with extra info about position in the text. Once the database is created accessing it to display the sketch and concordance information is really simple. The site and auxiliary tools were written in around 1400 lines of Python/Django. I am still not sure about what to do with this, if there is anyone interested on adding some corpora to it, continue development or anything else, please let me know.

5 August 2008

Isaac Clerencia: Adelsried

It’s been almost a week already since I arrived to Adelsried. I am going to work here for two weeks and a half (according to the initial contract at least). That means I can’t go to Akademy in the end, too bad :( The town is quite small, with around 2000 inhabitants, and not much social life, except for the hotel where we are hosted. The hotel is great, probably the best I have ever been to. Great swimming pool and jacuzzi, really friendly staff, nice rooms with big and comfy beds, a magnificent “biergarten” where we have some drinks and dinner every night, delicious food, bikes to ride for free, … :) Despite the lack of social life, the town is beautiful, first of all it’s in the middle of a natural reservation, with dense forests completely surrounding the city. Every house has a gorgeous garden with loads of flowers and some interesting decorations. The highlight is this really high pole in the city center with loads of coats of arms, and a pine on top of it. Hilarious :P The work is pretty good too, bleeding edge stuff, really good working environment, nice and international workmates and free drinks :D And today I uttered my first full sentence in German since lots of years ago!!!

22 July 2008

Isaac Clerencia: Untangle yourself from ethics

A workmate called my attention today upon the fact that when you search for ‘ebox’ or ‘ebox-platform’ in Google you get some sponsored links from our fierce competitor, Untangle. Here is a screenshot of the ad:
Easier than eBox
You can see a full screenshot of the search too. On one hand, I am kind of honored about the fact that a California-based company which has raised almost 20 million dollars in venture capital and has over 30 employees is targeting us (a self-funded company) in such an explicit way, it must mean we are definitely on the good track :) On the other hand, this reminds me of the time when Ximian started to play with KDE keywords … yeah, we both are developing an open-source product, but one of us doesn’t care about ethics that much. BTW, we have a new shiny website :P

16 May 2008

Clint Adams: It was GORGEous and GOLDEN until it was black

[This entry is dedicated to Russell, , and the squirrels ( ) that tried to sit on my lap even though I told them that I was not toresbe.] The man handed us burritos full of spinach-infused E. coli and salsa verde of the botulist manifesto. Para llevar? You bet. I need to get me some waterfall Giardia to right my viscera or I'm bound to start hallucinating mountain paths full of dogs, e, inedible gorp, and children throwing themselves to their death. Hi, kids. , , , what happened to the garlic bread Can you imagine being allergic to ? My Dreamsicle can't. Now fly, fly away to the land of the peppermint tea, the deer without fear, the queer, the other beer, Sue's sambar. I like my pretty damn fancy, but we're not in , are we, Toto? There is a warp in the space-time continuum, causing multiple instances of calderae and 27 Dresses. One fled a bookstore and flew to its adopted homeland. One time. It sure is windy atop this peak, and while Phil Collins sings about burning down some kind of mission, the husband is eying Mr. MacLachlan. My ex's ex gives a lesson about testosterone, but we are too far away to see the bison. The bison do not, it would seem, give a damn about us or Irving, and they do not care about the worker exposing her VS panties. A secret hidden jeep whisks, and a card hides defiantly in my wallet. Nothing more can be said, and not for the reasons you think.

19 March 2008

Adeodato Sim : MyEpisodes.com

Via Planet Warp, Blaxter blogs about MyEpisodes.com. Useful to keep track of your pending episodes to watch and acquire. I like the “All-In-One!” view. Update: Oh, and as several people mentioned, there is also pogdesign.co.uk/cat, but that’s only a calendar of upcoming episodes, you can’t track your status with it AFAICS. OTOH, it doesn’t require a login, only a cookie.

15 March 2008

Isaac Clerencia: Please, Dems, don t mess up this one: vote for Obama

I am a huge political junkie and I have been closely following Europe and US politics for more than 5 years. After this time and several disappointments, I have to admit that Obama is the first truly inspirational politician I have seen (listen to the Yes We Can song based on his New Hampshire speech). Some of his detractors dismiss his speeches as lousy, empty or vague, but you just have to listen to a couple of them to see that he is genuinely smart (such as the one about faith and atheism or the interview at Google). He doesn’t only take the right stance on most issues that I care about (Iraq, foreign policy, ethics, net neutrality, …), but he does it in a sincere way. Obama just gets it. I have got this impression from watching several of his speeches and interviews, but Marc Andreessen had the chance to spend an hour and a half with him a year ago and got the very same feeling. The main argument against Barack Obama nowadays is his alleged lack of experience. “Watch how I run my campaign”, Barack said to Marc when inquired about that. It’s obvious that running a primary campaign isn’t the same as being POTUS, but being the president’s wife isn’t exactly the same either. So if we compare the Obama and Hillary campaigns we can easily see Hillary’s experience as an “old school” politician. She overstates, lies, accepts loads of money from lobbies (because “they represent people too”, haha), resorts to fear-mongering (”Obama is not a muslim, …, as far as I know”, 3 a.m. ad), sides with McCain if needed to get some extra votes, surrounds herself with nitwits, … . To summarize, she uses every dirty trick she has learned in these years in Washington, and that’s exactly what I am so sick of right now. On the other hand, Obama’s campaign hasn’t just been one of the best organized and executed campaigns I have ever seen, but also the cleanest one. He has managed to overcome double-digit Hillary leads in most states without having to resort to any of these experienced politician’s dirty tricks. If I have to trust one of both to run a country, the decision is obvious. If I didn’t manage to convince you, I hope Lawrence Lessig and xkcd’s Randall Munroe do. Obama is leading and almost there, he just needs the final push. Please, do the right thing.

11 March 2008

Isaac Clerencia: On why I love The Wire

I have just watched The Wire’s last episode. For those who don’t know about it, The Wire is the greatest TV series ever created (Salon and Slate back me on this). It’s been acclaimed by critics, but widely disregarded by audience. I’ll never forget Jimmy McNulty, a troubled Irish American dipsomaniac murder detective (played by brilliant Brit Dominic West) or Omar Little, a Robin Hood-like stickup homosexual man in west Baltimore. The rest of the deeply portrayed characters of the show are great too, but above all of them, the real starring role belongs to Baltimore. I am sure Baltimore’s reality goes way beyond this show, but I don’t think a show can get more real than The Wire. Each season focuses on a different topic, such as drug-dealing, unions, politics, the press, always keeping the police department around. The story arcs are really long and complex, The Wire is not the kind of show you can enjoy watching a single episode of, but more like, as its own creator - a former Baltimore Sun journalist - put it, a “66 hour movie”. Well, I could keep praising it for hours, but lots of people have done that already, even Barack Obama loves it (:P, let’s ride the hype). Praise available in Spanish too :P Besides, Eliot Spitzer has made wiretaps really popular again these last days ;) Really, you must see it.

25 January 2008

Isaac Clerencia: A long time ago

… I used to write in this blog about random things. Let me check what I have done lately … well, first of all I spent 10 days in San Francisco in November, I had a really great time, we spent most of the time there but also paid a visit to the Googleplex, Stanford, Berkeley, … and went several days to the Yosemite National Park, a great trip overall :) Besides that I gave up one of my jobs (the boring and not challenging one …) two months ago (although it seems like it was ages ago) and started working full-time in my company. In addition, I spent New Year’s Eve in London to begin the year in a different way :) Right, that was all :P

11 January 2008

Holger Levsen: about Debian on the OLPC and OLPC Europe and more

Originally I planned to post this with the title "Last night I slept with 300 people" but this night happened two weeks ago... It was the night before the fourth and last day of the 24C3 were I slept in the gym :-) Actually I also planned to blog on the third day but then this day turned out to be really busy... and then I arrived home on new years eve and suddenly it was a week later and now it's the 10th of January. Time flies when you're having fun. And as you might have noticed it's not even the 10th anymore...

Timewarp back to the chaos communication congress! I think it's safe to say that the Debian booth at the 24C3 was a success. It was a nice meeting (and storage) point for Debian people, we collected quite some donations for t-shirts and stuff (the exact amount needs to be examined still) and we were able to help various users and contributors answering Debian specific questions of both kinds: how to install/configure/fix foo and packaging and other development questions from a number of people.. And we had a babelbox setup which was much better understood and perceived, once I added a sign explaining it :-)

Thanks a lot to the 24C3 organizers and the angels (thats how the congress volunteers are called) for making such a smooth and interesting conference as well as giving such a great space to the Debian booth! And equally thanks a lot to all the people operating our booth! For those who are interested to attend next year: roughly 64 talks were held in english, and 26 in german. I saw about five events live...



The sign hung for about an hour unmodified...

On the third day of the congress we had an OLPC.de meeting, which was quite productive and resulted in us founding OLPC Germany this monday. In the aftermath of this meeting I came up with the idea of having an OLPC Europe event at FOSDEM in Brussels in February, which by now has been accepted and scheduled by the FOSDEM organizers. Yay! So if you are in Europe and involved or interested in the OLPC, please mark the 23rd of February 15-17 localtime in your calendar :-) The idea of these projects is probably best summarized with "think global, act local and global", for more detail please read our vision. (And keep in mind this is in its very early stages.) OLPC Europe should also become an interface for all those european OLPC efforts which have been popping up recently and which all take up ressources in Cambridge, the OLPC "mothership", taking ressources away from the children of the world.

Then on the last day of the 24C3 congress I also gave the DebConf7 "thank you, Sponsor"-package to those four people from the freifunk community, who helped us out with accesspoints for Edinburgh. Much to my surprise and joy, they were really happy about it! Funnily two of those four are also among the three OpenWRT developers who ported OpenWRT to the OLPC laptop, which I borrowed to them somewhat in return :-) And now we work together in OLPC.de and .eu. Networking is sometimes really really fun.

Fast forward to 2008. Two days ago I finanlly had the time to to run etch, lenny and sid on the OLPC laptop (with wireless (including WPA), xorg and sound working and dualbooting with the original fedora install) and then yesterday I've created a usbstick which successfully booted a "d-i prototype". Yay! And best of all (for me), most of the actual work was done by other people, I just had to collect the pieces. My next steps will be documenting what I did and prepare a d-i image which actually works. I don't have pics yet (it's Debian running on a laptop, I guess you can imagine this), so for now I will just post another picture I received some three months ago and which made me incredibly happy at that time:



When I have a working d-i running on it, I'll post more pics.

Next.

Previous.