November 23, 2007

ycp is not only a language. YaST ruby bindings improvements

After quite lot of hacking nights, I managed to get some yast2 ruby bindings improvements working.

You might know that ycp is not only a language, but a component technology. Every component using the YaST2 technology can be reused from other YaST components no matter what language they are written in, as long as there are bindings for that. That was the original intention of the ruby bindings.

So for example, there is a component call Storage, which is written in the ycp language. The component (well, it is really a namespace, but YaST sees it as a namespace component) is located in /usr/share/YaST2/modules/Storage.ycp (.ybc for the bytecode compiled version) and offers some medium level functions that YaST uses.

This component needs low level access to the system, for which there is another module called Libstorage ( located in /usr/share/YaST2/modules/LibStorage.pm ) which in this case is written in perl which is a language YaST supports as long as you follows some simple rules.

The reason is because libstorage is a C++ library, and there is no easy way to bind it to the YaST environment, but as YaST supports perl, you can generate perl bindings for the C++ library and all the library functionality will be available to other components in YaST.

So repeat after me. ycp is not only a language. It is a communication protocol, used by YaST component framework.

So, with the ruby bindings, you where able to do:

require 'yast'

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

But I was never happy with the syntax. The idea was that you construct a dynamic proxy for a YaST component and then call methods on it. This had some disadvantages:

  • If the component did not exist, you did not get an error till the method call
  • It was not possible to do introspection to the component, because the methods call where implemented using the method_missing hook. So basically the proxy responded to all methods and only raised an error if the equivalent call to the YaST side was not possible.

So I decided to look for a new approach. This is the result till now:

require 'yast'
require 'ycp/storage'

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

Oh yes, you notice. First, there is no need to instantiate the module, a classic require will do it. The bindings modify the built-in require method, so if you require something under ycp/, a module is created on the fly. A real module, a real symbol. You can also import it manually using YCP::import

Now, you can do this:

puts YCP::Storage.methods

When the module is imported, the symbols are declared in the module, so you can ask for them in the module. I still need to work on other symbol types, but it should be straight forward.

The last improvement is that I simplified the C part of the bindings a lot, and moved most of the magic to pure ruby code, which makes easier to work with.

Next improvement, the other way around, making nicer how to call ruby components from any other component.

November 14, 2007

Cool things in a cold day

Nice surprise today:

Schnee

  • ITO time spent on YaST. No success yet with Wt. It does not provide something like Qt’s QSocketNotifier, or glib’s gioadd_watch which integrate themselves with the event loop. Did a hack with a standard select and a timeout, did not work. Even worse, Wt crashes on processEvents().

  • Will hosted a hack session on Saturday. While I did not get any code done, I got motivated by the Kopete 4.x state to continue working on it at home. Yesterday I commited my chat window participants view code for Kopete. It simplifies the code and the signal battle a lot. I still have to fix some issues.

  • The Android stuff is so cool. Read this post about Dalvik: how Google routed around Sun’s IP-based licensing restrictions on Java ME. The Activity, Services and Intents model seems natural for other scenarios, not only mobiles.

October 21, 2007

Taskjuggler

Surprised to find out that Chris is writing Taskjuggler3 from scratch, and this time, in Ruby:

TaskJuggler 3.x is a from-scratch rewrite of TaskJuggler. It’s currently in its infancy and only supports a minimum feature set. It is not intended for users yet. Please join our developer forum if you are interested in contributing. In contrast to the 2.x version TaskJuggler 3.x is written in Ruby.

There is a git repository in

http://www.taskjuggler.org/git-repos/taskjuggler3.git

in case you want to give it a look.

October 4, 2007

YaST survey

YaST wants to know about its community and users. Help us answering this survey.

October 3, 2007

various

One Click Install

Help us to market one click install. Go to your software vendor and ask them to provide one-click-install links for their product, together with a install repository. They will, answer “we have no idea how to do that”, then you point them to this tutorial.

Qt

From Aaron’s blog:

Matthias Ettrich is up now doing the Qt platform directions talk, speaking about where Qt is goingin 4.4 and 4.5. He covered:

One of the topics was:

WebKit: merging web technologies and desktop applications. Things like accessing signals/slots from javascript or moving things around in the DOM from C++

Also:

There are apparently plans for at least a 4.7 and there are no current plans for Qt5. If a Qt5 were to happen, it wouldn’t be before 2011/2012 and it would not be a major API design break with Qt4 as Qt4 was to Qt3. However, they feel that Qt4 has what is needed for years of innovation to come and so there are no plans at all for a Qt5 right now.

openSUSE 10.3

From Martin Schlander’s blog:

After listening to those same complaints for a long period of time, it’s amazing that they are all obsoleted in one single release cycle.

  • Cleaned up my bug list. Closed 10.2 bugs fixed in 10.3 that will not be released as online updates and other ones.

Package Kit

Richard Hughes calls for a Qt based package manager for PackageKit.

I would love to see a QT-based package manager and update icon using the PackageKit API. I’m quite prepared to make changes the the libpackagekit source if this is needed, I know I use a lot of gobject’isms. I can provide a private git server and add as much documentation as you guys need, I just need someone to take lead of such a project. Email the mailing list if you are interested. Thanks.

You can see documentation here and available backends here.

Kopete

Matt Rogers calls for more Kopete developers.

My build service packages

Upgraded and fixed builds in most packages from the security:privacy repository project in the openSUSE build service, including tor, torK, vidalia and truecrypt. torK still does not build on x86.

September 11, 2007

Darl McBride interview

Interesting interview to the most hated man in software, the CEO and president of the litigation and former software company SCO, Darl McBride.

Best quote:

Then in the “excluded assets” it says, “excluding copyrights and patents.” Well, that’s the thing that never made sense. So when I first hired on (at) the company, we had intellectual property attorneys look at that, and they said, “This makes no sense.” You can’t buy software without the copyright. It’s like buying a book without the words. It doesn’t make any sense at all….

What are millions of users doing with proprietary software? Buying licenses. Buying “some rights” (to use, for example), not the copyright. When you buy a book. It comes with the words, but you don’t get the copyright.

Even with free software, you get a super-combo of rights which allow you to do anything except restricting those rights to someone. But still you don’t get the copyright ;-) .

July 17, 2007

ACTI (o sus miembros) comienza(n) a sembrar miedo

(El Mercurio ):

Acuerdos internacionales: Neutralidad tecnológica en riesgo ante proyecto de diputados

La Asociación Chilena de Empresas de Tecnologías de la Información (ACTI) advirtió los riesgos que implica el acuerdo alcanzado en la Cámara de Diputados, durante la semana >pasada, que solicita a la Presidenta de la República disponer la implementación en las oficinas de la Administración del Estado de software libres en sus sistemas informáticos.>

La medida, que se haría extensiva a todos los establecimientos educacionales del país, iría contra “los acuerdos internacionales que Chile posee referente a neutralidad tecnológica, e iría en contra de lo que es la tendencia mundial en la materia”, aseguró Raúl Ciudad, presidente de la ACTI.

Para Ciudad, la neutralidad tecnológica impulsa la libre competencia que, con una adecuada protección a los derechos de propiedad intelectual, estimula la inversión en >investigación y desarrollo, la innovación, la creación de empleos de alto valor agregado y bien remunerados y la generación de impuestos, entre otras situaciones.

El asesor jurídico de ACTI, Rodrigo Rojas, aseguró que la iniciativa de los diputados “podría violar garantías constitucionales, tales como el principio de igualdad ante la ley y el de no discriminación”.

El termino “neutralidad tecnológica” es un termino que salió de los promotores del software libre.

La implementación de software libre por parte del Estado no viola ninguna garantía constitucional:

  • El software libre lo puede proveer cualquier empresa. Fomenta la competencia y la economía local.
  • El que los ciudadanos requieran softwares de ciertas compañias, como Microsoft, Adobe para acceder a datos públicos (cosa que sucede hoy) si es una violación a estas garantías.
  • ¿ Vamos a empezar con FUD criollo haciendo mención a temas como propiedad intelectual e investigación o desarrollo ?

Hoy en día la industria tiene las siguientes características:

  • No hay competencia. Solo un par de proveedores. Entre ellos Microsoft (miembro de la ACTI)
  • El dinero en soporte se lo lleva la industria extranjera
  • No hay respeto por los estándares abiertos. Datos del Estado son almacenados en formatos proprietarios que requieren de pago de licencias para ser vistos por un ciudadano (discriminación). Los datos del estado requieren el uso de los sistemas de los proveedores mencionados anteriormente.
  • El software libre estimula el respeto por los estándares abiertos, la no discriminación de plataforma tecnológica y la no discriminación al soporte e industria local.
  • El software libre fomenta la investigación universitaria y la generación de proyectos. Vean a la Unión Europea.
  • El software libre esta basado en la idea del copyright, con licencias permisivas por parte de los dueños del copyright.

A continuación les anuncio la estrategia que los lobbystas de las corporaciones utilizarán para expander miedo y terror ante nuestros parlamentarios:

  • Utilizarán la palabra “propiedad intelectual” en vez de “derechos de autor” para meter en un solo saco patentes, copyright y patatas fritas, para expander el miedo y duda de que el software libre no respeta la propiedad intelectual. Por supuesto, jamás será mencionado un solo caso de violaciones de copyright de corporaciones que perjudican a los autores de software libre.
  • Que el software libre causará desempleo y menos impuestos. Claro, seguramente el tener a una corporación extranjera con un call-center en Guatemala dando soporte y llevandose las ganancias fuera perjudicará menos el empleo que si muchas pymes locales dan soporte a software libre en forma local. LinuxCenter es un buen ejemplo ( y es miembro de la ACTI ).

En cierta forma esto es resultado de lo mal que Roberto Sepúlveda abordo el tema, centrándolo en un tema de costos. En un post anterior hice mención de como el proyecto del diputado Navarro, centrado en la neutralidad tecnológica (que coincidencia, la misma palabra de la que se quiere apropiar la ACTI), es una razón con mas peso a nivel de país y democracia que el tema costos (que es una concecuencia, no una razón).

Update: La noticia está en también en Fayerwayer.

July 4, 2007

aKademy 2007 Glasgow

So aKademy is over for me. While I type this I am flying back to Germany.

But not for everyone. Hundred of hackers and contributors are still in Glasgow, discussing and coding the pieces that conform the best free desktop out there.

The first social event was in a strange, but cool place called something with “Duck” in it. It was perfect except for the Dj on crack which sounded like a mp3 player with skips on a super high I/O load. People also had some obsession with fruits and flavors in beer which germans did not like.

On Monday evening, we had a nice event at the City Hall. The place was like a palace. Lot of marmol, paintings and details. The reception was in a big luxurious room, were the city authorities and Aaron gave a speech, followed by nice food and wine. We also sang happy birthday to Zack, the KDE e.V. and other people. I did not bring my camera, but here there is a picture from Nikolaj Hald Nielsen blog.

I had much fun talking with the spanish guys (plus Helio). Finally met Thiago and Charles and had a italian dinner with Will and some Trolls.

Unlike last year, I was able to get my KDE4 development environment running in no time, and spend most of the time playing with Kross and Kopete integration.

The organization was good. I liked the hostel more than the one in Dublin, especially because it had one bathroom per shared room and completely free wireless (even if it only worked the first day).

Scotland was a special place for me to visit, as the first MacVicar came to Chile from Scotland. I had the chance to meet some of family there. That was incredible! They even showed me the original letter the wife of the first MacVicar in Chile wrote to his brother in Scotland announcing his death.

  • Glasgow has a nice downtown, but it is not my kind of city (Well, Dublin wasn’t too). I am looking forward to see other cities from the country in the future.
  • When walking in the street. I immediately noticed something. Then I realized it was not my imagination.

I think we were all amazed by the number of people. It really felt like a big group (just check the group photo). You rock guys.

My photoset is here.

June 23, 2007

Parlement

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.

June 22, 2007

free software now takes on your camera.

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