Duncan Mac-Vicar P.


Archive for June, 2007

Hackweek III (day 4)

without comments

Martin Vidner succeeded in making possible to use YaST UI:: from the language bindings. This means you could write a complete module in Perl, and get the benefits of the abstracted Qt/ncurses/gtk user interface.

These changes means that my Ruby bindings will be able to support it too.

I also got the code as yast2-bindings-ruby in the build service, it doesn’t build yet, but soon will appear in the home:dmacvicar project.

Srinivasa Ragavan is working on Desktop status awareness, which means trying to do useful tasks when you are away from your computer. I pointed him to the Kopete motion-auto-away plugin I hacked some years ago in order to set the user away in the messaging client if no motion was detected in a webcam stream.

Written by duncan

June 28th, 2007 at 7:32 am

Posted in uncategorized

Tagged with , ,

Hackweek II (Day 3)

without comments

So today SCR (system configuration repository) works from Ruby. Also if you call Ruby from YCP and the Ruby module calls YaST, Ruby can’t find the library. I fixed that.

require 'yast'

m = YaST::Module.new("SCR")
m.Execute(".target.bash", "firefox")

Will launch firefox

require 'yast'

m = YaST::Module.new("SCR")
modules = m.Read(".proc.modules")
modules.each do | k, v |
  puts "#{k}:"
  v.each do | a, b |
    puts "    #{a} - #{b}"
  end
end

Will output:

de_cd:
    size - 40608
    used - 0
cdrom:
    size - 36896
    used - 2
ehci_hcd:
    size - 34956
    used - 0
... (more)

Written by duncan

June 27th, 2007 at 12:23 pm

Posted in uncategorized

Tagged with ,

Hackweek

without comments

So, it is Hackweek. Hundreds of Novell engineers working on the things they are passionate about. A full week of fully innovation and cooperation.

You can see the flickr photos here. The ideas collected (more than 300, with a hundred in progress).

So what am I doing? There are a few ideas for YaST. YaST needs new light to evolve somewhere, and most of the ideas bring a step in this direction: Making it accessible from web services, other languages support, UI independence from the ycp language, etc.

YaST already has perl bindings and there are some modules written in Perl.

My project is bidirectional ruby support for YaST, and it works already.

So, in Ruby you could write:

module Foo
  def self.multiply_by_eight(a)
    return 8*a
  end

  def self.sum(a,b)
    return a+b;
  end

And then in a .ycp file:

{
    import "Foo";
    integer result = (integer) Foo::sum(2,3);
    UI::OpenDialog(
         `VBox(
         `Label(sformat("%1", result)),
         `PushButton("OK")
         )
         );
    UI::UserInput();
    UI::CloseDialog();
}

It works!!!!:

Image Hosted by ImageShack.us

Now, we can do YaST in Ruby too, using the “yast” module for Ruby, lets try the Arch module from YaST (which is ycp code)

require 'yast'

m = YaST::Module.new("Arch")
puts m.sparc32
puts m.arch_short
puts m.is_xen

The output is:

false
x86_64
false

What about something more complex. The Storage module is a C++ library. In order to bind it easily with YaST and being able to use SWIG, YaST developers access it using the YaST perl-bindings to access the generated SWIG perl-bindings from the C++ library, so calling this from Ruby code would go from Ruby, to YCP, to Perl, to C++:

m = YaST::Module.new("Storage")
dp = m.GetDiskPartition("/dev/sda1")
dp.each do | key, value |
  puts "#{key} #{value}"
end

The output is:

nr 1
disk /dev/sda

I also tried to access the UI, but it does not work. Martin Vidner told me he is working on getting rid of this limitation. SCR access should be doable but I haven’t look at it yet.

I will decide tomorrow if I tune the code or I spend my 2 days left (I travel to aKademy on Friday) researching other stuff (probably I will spend it on YaST too).

Written by duncan

June 26th, 2007 at 5:42 pm

Posted in uncategorized

Tagged with ,

“La excelencia académica sin selección de alumnos es completamente posible”

with one comment

Hoy en La Tercera:

Aaron Brenner, uno de los fundadores de las Escuelas Kipp, los establecimientos públicos más exitosos de Estados Unidos “La excelencia académica sin selección de alumnos es completamente posible”

Invitado a Chile por Libertad y Desarrollo, este académico y director de la Kipp Shine de Houton habla sobre los factores que permiten a estos colegios contar con un 90% de ingreso a la universidad pese a la condición social de sus alumnos.

Destaco:

  • ¿Existen incentivos al desempeño docente?
  • Pagamos un 20% más que en las otras escuelas del Estado, pagamos todos los seguros médicos, les damos un computador o laptop a los profesores y también un celular por si su familia necesita comunicarse con ellos. También tenemos un programa de apoyo al ahorro, según el cual por cada dólar que los maestros ponen en una cuenta, nosotros agregamos otro. Fiscalización y costos

  • ¿Cuánto cuesta educar a un niño en las escuelas Kipp?

  • US$ 9 mil dólares al año por alumno. Es lo mismo que se gasta en las otras escuelas públicas. Incluso el Estado nos da menos dinero, porque recibimos subvención. De 9 mil, 6 mil los entrega el Estado y el resto son donaciones privadas. Este año tenemos más de US$ 80 millones en donaciones.

Written by duncan

June 23rd, 2007 at 8:13 am

Posted in Uncategorized

Tagged with , , , ,

Parlement

without comments

parlement 0.13:

parlement is a mailing list and a Web forum moderated using Direct Democratic principles: votes and personal filters. It is also a P2P system that aims to implement electoral lists and PGP signatures.

Written by duncan

June 23rd, 2007 at 8:10 am

free software now takes on your camera.

without comments

Free software first invaded your server, then your desktop, then your laptop, and now it is conquering your devices.

It is known already you can replace your limited Linksys firmware to turn your $100 router into a $1000 router with openwrt. Or that you can replace your lame and proprietary ipod (and other mp3 players) firmware with rockbox, and get real tagging, ogg vorbs support, and even games like frozen bubble.

But I knew from Martin yesterday that there is even now a firmware for your digital camera available, and mine seems to be supported. I have to try it!.

Currently, the CHDK firmware is available for Canon digital cameras of the following models:

  • A610, Fw: 1.00D (with CHDK version for 1.00E), 1.00E, 1.00F
  • A620, Fw: 1.00F ( 1.00E is not compatible. You must upgrade to 1.00F first )
  • A630, Fw: 1.00C
  • A640, Fw: 1.00B
  • A710 IS, Fw: 1.00A
  • S2 IS, Fw: 1.00E, 1.00F, 1.00G, 1.00I (with CHDK version for 1.00G)
  • S3 IS, Fw: 1.00A

Written by duncan

June 22nd, 2007 at 5:38 am

Posted in uncategorized

Tagged with

Educación para la ciudadanía

without comments

En España se está dando un debate entre la Iglesia Católica y el Estado por la nueva asignatura que se piensa impartir.

Antes de opinar, creo que es bueno ver que contiene la asignatura.

En los Objetivos y contenidos para tercer ciclo de Primaria destaco:

  1. Conocer y aceptar la propia identidad, las características y experiencias personales, respetar las diferencias con los otros (edad, sexo, características físicas, personalidad, etc.) y desarrollar la autoestima.

Esto se necesita urgente en Chile.

  1. Desarrollar la afectividad en todos los ámbitos de la personalidad y en sus relaciones con los demás, así como una actitud contraria a la violencia, a los estereotipos y prejuicios.

  2. Reconocer la diversidad como enriquecedora de la convivencia, mostrar respeto por las costumbres y modos de vida de poblaciones distintas a la propia. Incorporar a los niños y niñas extranjeros en su nuevo entorno sociocultural.

Según la iglesia, el Estado se está metiendo en temas que no le incumben. Yo aún no logro ver el punto de la Iglesia y sólo veo temas básicos y fundamentales para cualquier sociedad. ¿Alguien ha encontrado temas en que el Estado este dando una visión politizada sobre algo?

Written by duncan

June 21st, 2007 at 9:22 am

Posted in Uncategorized

Tagged with , , ,

Chile: Los 100 mejores colegios de la última década (Simce)

with one comment

Por primera vez un ranking muestra a los colegios que durante los últimos 10 años mantuvieron un lugar destacado por su rendimiento académico. Para elaborarlo, La Tercera consideró los resultados de cada uno de los establecimientos que rindieron las pruebas Simce entre 1997 y el último informe de 2006. * Entre los 10 primeros lugares se ubican un colegio alemán, dos ingleses, un francés, tres pertenecientes a congregaciones religiosas y dos de regiones, específicamente de la zona sur y de propiedad de Celulosa Arauco, incluyendo al líder de este ranking: el Colegio Constitución.

Enlace (La Tercera)

Mi colegio aparece en el ranking. Último puesto entre los top-50 de la década. Lo interesante es que estuvo alguna vez entre los diez mejores del país. Y bajó 50 puestos en unos años. ¿Qué hicieron con él?.

Written by duncan

June 17th, 2007 at 11:23 am

Posted in Uncategorized

Tagged with ,

EE UU y la OTAN firmaron en 2001 un acuerdo que consentía a la CIA encarcelar a sospechosos en Europa

without comments

El jefe de los investigadores del Consejo de Europa, Dick Marty, ha revelado hoy que Estados Unidos y la OTAN firmaron un acuerdo que permitía a la CIA encarcelar a personas sospechosas de ser terroristas en territorio europeo.

Los investigadores también han encontrado pruebas que confirman la existencia de las prisiones secretas de la CIA en países que trabajaron en estricto contacto con Estados Unidos. Entre ellos se encuentran Polonia y Rumania, que siempre negaron tener cualquier relación con la CIA. Estos datos se desprenden del segundo informe sobre las cárceles secretas en Europa que se publicará hoy y al que algunos periódicos han tenido acceso.

Link: El Pais

Written by duncan

June 8th, 2007 at 7:55 am

Posted in Uncategorized

Tagged with , ,

Media

with one comment

  • Traveling to Chile

In various occasions, when asking Europeans why they haven’t been in Chile, they answer “it is too dangerous, isn’t it?”. Sadly, the European media only broadcast news from South America related to poverty, Colombia’s guerrilla, Mapuche’s conflict, etc. The image created on people’s brain is only based on that “picture”. Add to that the horrible job our tourism office does.

However, most people here travel to Spain and feel quite secure. This makes sense. Spain is #21 on Global Peace Index Ranking. Did you know Chile is #16 ?.

When YouTube CEO Chad Hurley told a Congressional committee that his company “advances democracy,” perhaps this was the sort of thing he had in mind.

An opposition Venezuelan television station whose broadcast license has not been renewed by the government is now turning to YouTube to get its message out after its transmitter was taken over by a state-run channel. Hugo Chavez’s “Bolivarian Revolution” has no time for media groups that criticize his government; Radio Caracas Televisión (RCTV) is now off the air, and another channel, Globovision, could be next, according to CNN.

Written by duncan

June 3rd, 2007 at 5:12 pm

Posted in uncategorized

Tagged with , ,