Association Subscribers Manager and Open source stuffs

To content | To menu | To search

Tag - development

Entries feed - Comments feed

Sunday 14 September 2008

A little pause from slack-get : coding a Perl module for the croquemonster API.

Hi,
After the huge code update I made on slack-get, I must say that I was a bit tired of thinking about the same problems every second.
Fortunatly my young wife is both a good writer and a super-geek, invite me to a new game-to-loose-lots-of-time named croquemonster.
It is unfortunatly only in French, but gues what... They have a XML api ! So, of course, I made a Perl module out of this API.
The Games::CroqueMonster module implements the whole 0.8.1 api specification. The module version is gave after the api version.

You can try this module by downloading it from here (attachement) or from my page on CPAN.


I will release some scripts using this module soon.

Enjoy !

Arnaud Dupuis

Tuesday 9 September 2008

Another new feature in slack-get media system

Hello,

There is one thing I hate a lot : answering stupid questions. It makes me loose my time and I certainly do not like that !
The problem is that slack-get is asking stupid questions ! Take the dependencies tracking for example :
Even if it find a package with the exact name you requested it propose to you all the matching results.
And one other thing I really don't like in slack-get (and maybe in other package manager) is that if it find the same package on more than one media it asks you to choose one.
I do not like that because it is typically something which can be decided by software itself. If I talk about slack-get, there is a simple way to prefer one media to another : you have to fill a <official-media> tag in the configuration file ! I mean, it is an obvious way to prefer this official media and not bother user asking him if he prefer to install amarok from Slackware's official servers or from linuxpackages.
But since, yuo can actually prefer this I added a new feature to the media system : a ranking system.
You can now add a <rank> tag in the medias.xml file (inside a <media></media> group), with an integer inside. Since it is a rank, the smaller the number is the highest priority the media get.
In a near futur (this week at most), I will implements the following new decision algorithm in the dependencies tracking and package installation/upgrade systems :
 - if there is more than one result for a package check :
   - check if there is packages with their name exactly equal to the request select them
      - if their is more than one package like that (name == request) :
          - check if the medias use ranks
              - if yes, then select the package with the highest rank (the smaller number inside <rank></rank>)
              - if not, check if the official-media have the requested package
                   - if yes, select the package
                   - if not, ask user to choose a package
      - else if there is only one, select this package
      - else (there is no package where name == request), ask user to choose between the original search results.
- else (there is only one response) select the package.

I think this algorithm, will help to not stupidly bother users by asking unnecessary questions. And since I am fully aware that some users will not like this automated thing, I will also add a configuration key and a command line option to allow them to enable/disable this system.

That's all for today !

See ya' for the slack-get development diary #8.

Arnaud Dupuis

Saturday 6 September 2008

slack-get Perl api available (again)

Hi,
The Slackware::Slackget api is available on CPAN, but the latest documenation is now available in the SVN tree (viewable on Sourceforge's viewsvn service) and on my own server.
The two last ones will be more up-to-date than the CPAN one.

I hope that it will helps contributors !

Arnaud Dupuis.

Friday 5 September 2008

Another huge bug discovered and fixed in slack-get !!

Hi,
Today I was going to improve (let's say "finish") the dependency tracking system, which is not good enough yet, and I ran into something very very bad...
Before doing anything with the package system, I all the time modify my medias.xml and add a local repository wich contains only one package and it's dependency tree.
Doing this I found a pretty importantly bad bug. This one is described on the slack-get bugtracking system on Sourceforge.
In one word the Slackware::Slackget::Connection's drivers system was completly bugged and had a very important namespace corruption wich was leading to a massive code malfunction.
So far, I strongly recommend to update your local SVN copy.

Fortunatly I fixed this in the latest SVN revision (198).
I hope that I will not found any other surprises like this one !

Arnaud Dupuis

Thursday 4 September 2008

Sourceforge SVN downtime : no slack-get commits for the next 24 hours

Hi,
Sourceforce is migrating Subversion's data on to new storage hardware and conduct performance
testing today from 04:00 UTC and for approximatively 24hours.
As a consequence all write operations will fail, so there will not be any updates of the slack-get svn tree during this time.
Read operations are unaffected by this process.

Good day,

Arnaud Dupuis

Wednesday 3 September 2008

slack-get development diary #7

Hi,
Here is the 7th opus of the slack-get development diary. There is a lot to say because I made lots of changes since the last diary.

1) The C++ API's first parts :
Since the last post where I was talking about this I added to the existing Slackget::Package and Slackget::PackageList 3 new classes : Slackget::Config, Slackget::Utils and Slackget::QSimpleUpdate.
Slackget::Config is used to represent slack-get's XML configuration file and Slackget::Utils contains some static utilitary methods.
Slackget::QSimpleUpdate is a Qt 4 widget. Its goal is to present a list of packages to users in the most simple way. It behave very simply by showing a list of items wich contains an image, a package name and its version. More informations about a package are available via the Qt's traditionnal tooltip system.

I plan in renaming Slackget::Utils to simply Slackget but I am not yet sure. I am not sure because I want to re-organize the C++ api's tree.
There is currently a trunk/src/ directory which contains QSimpleUpdate sources, and a trunk/lib/Cpp/ which contains the other classes.
More specifically, it contains the SlackgetCore module. I plan on modify this tree the following way :
trunk/lib/Cpp/SlackgetCore/src/ -> contains all source files for the SlackgetCore modules (currently : Slackget::Package, Slackget::PackageList, Slackget::Config and Slackget::Utils)
trunk/lib/Cpp/SlackgetCore/include/ -> contains all headers file for the SlackgetCore modules
trunk/lib/Cpp/SlackgetGui/src/ -> contains all source files for the SlackgetGui modules (currently : Slackget::QSimpleUpdate)... This module actually do not exists at the time I am writting this article :)
trunk/lib/Cpp/SlackgetGui/include/ -> contains all headers file for the SlackgetCore modules
And of course I want to delete the trunk/src/ directory.
I am indeed a big fan of the Qt 4 modular architecture. Talking about Qt 4, all parts of the slack-get C++ api links against Qt 4. SlackgetCore links against QtCore (for all the super handy data types) and, of course, SlackgetGui will links against QtGui.

2) The Perl API and sg_daemon :
Well... It changed a lot so I made a new release of Slackware::Slackget on CPAN ... And again it changed so much since then that I could make another release !
The medias variables system is one of the good examples. But the huge bugs in sg_daemon which was not managing media's host efficiently is the main cause of changes in the Perl API.
This bug (or bugs) was preventing the sg_daemon to switch from a media's host to the next one. I corrected this issue and it is now working as it should do.
The main changes in the Slackware::Slackget Perl module are :
  * I changed Slackware::Slackget::Network::Connection behavior by replacing the host's constructor parameter by a media one (see modules documentation). I also added a next_host() method to this module. The goal is to take care of operations needed by the Connection.pm module (like parsing the URL and loading drivers).
  * I fixed a little bug in Slackware::Slackget::Network::Connection::HTTP.pm (the file was moved to its final destination before all tests).
  * I fixed a bug in Slackware::Slackget::Base and Slackware::Slackget::MediaList. The bug was very simple : I forgot to tell XML::Simple's parser to force array on all <li> elements. This result in a bug when there was only one element in a list.
  * I also spent some time cleanning lots of code (removed unneccessary comments, comments unnecessary code, etc.).
  * All this things result in a massive documentation's update.
  * I finally made all needed changes in the sg_daemon (which is not part of the Perl API...) which is now handling well dead hosts and host changing.

The next focus points in the development are :
     1 - Improve the C++ api (and particularly develop all classes needed to connect to a sg_daemon)
     2 - Port the plugin system to the new daemon.
     3 - Develop a real working GUI.
     4 - Start coding the multi-daemon cooperative work.

Still a lot to do !

Enjoy !

Arnaud Dupuis

Tuesday 2 September 2008

New feature: slack-get medias' options

Hi,
I just added a new feature to the slack-get media system. It is something I wanted to add for a long time now but I never had the time.
But since I am still stuck at home because of this stupid pneumonia, I now have the time...
What I wanted is a variables system in the medias.xml syntax. The direct benefit is that it is much more easier to modify the medias file after an upgrade of your Slackware box.
Indeed, if it is nice to be able to maintain multiple sources of packages, it is sometime a pain in the ass to update this file after an upgrade... When all URL of mirrors must be changed...
The Slackware version number is, indeed, the first "official" variable.
This system is very easy to use : you just have to declare an attribute in the <medialist> tag and it will be automatically converted to a variable by the Slackware::Slackget::MediaList and Slackware::Slackget::Media classes. You can use the variable in any tag content by using the special syntax ${<variable name>}.
Here is a simple example :

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<medialist slackware-version="12.1">
<media id="slackware-official">
<files>
<filelist>FILELIST.TXT</filelist>
<checksums>CHECKSUMS.md5</checksums>
<packages>PACKAGES.TXT</packages>
</files>
<download-signature>1</download-signature>
<update-repository>
<faster>http://ftp.lip6.fr/pub/linux/distributions/slackware/slackware-${slackware-version}/</faster>
<fast>
<li>http://ftp.bit.nl/mirror/slackware/slackware-${slackware-version}/</li>
<li>http://ftp.belnet.be/packages/slackware/slackware-${slackware-version}/</li>
</fast>
</update-repository>
<description>The official Slackware web site</description>
<web-link>http://www.slackware.com/</web-link>
</media>
</medialist>

As you can see it is both convinient and easy to implement. I am quite sure it will be very usefull when we will upgrade from Slackware 12.1 to 13.0 ;-)

Arnaud Dupuis.

Saturday 30 August 2008

slack-get user interface: step 1, how I see the futur

Hi,

as I already said I am currently developping the C++ API of slack-get. I also wrote that I am concentrating on usefull part of the API, skipping the generative parts that are not absolutly required at the moment. So in parallel to this development, I made some tests for the graphical user interface. I came up with the conclusion that there is 2 different way to use slack-get :

  1. Keep a Slackware box up-to-date by installing security fixes and Slackware patches
  2. Keep a box up-to-date, upgrade and install packages (but not patches)
So, considering that I decided to come with 2 different GUI : a dock application to tell users that there is patches available and the full graphical client (like the previous slack-get GUI).
I starts coding a little widget (Slackget::QSimpleUpdate). This one looks like that :


I am interested in any opinion/advice/suggestion concerning this. The code of this proof-of-concept is available on the SVN (in trunk/src/QSimpleUpdate/). I made it themable thanks to Qt4 support of CSS.
So far, I think it is a quite fine dock application. I wanted it to be simple to get working, and I also wanted that this widget is able to display enough informations.

That's all for today :)

Arnaud Dupuis

Friday 29 August 2008

Release: Slackware::Slackget v0.17

Hi,

A new version of the Slackware::Slackget module was released on CPAN.
This release features the followings changes :
 - lots of fix in order to make all classes of the module SGNC Compliant
 - Slackware::Slackget::GPG have had many methods implemented
 - change the to_string() behavior of the Slackware::Slackget::PackageList, Slackware::Slackget::Package and Slackware::Slackget::List to make them able to generate a Slackware's PACKAGES.TXT (supporting, of course, the slapt-get/swaret format for dependencies).

This module was in a need of a new release since the documentation have been updated a lot (and I personally use CPAN as my API doc reference ^^).

Arnaud Dupuis

Wednesday 27 August 2008

First parts of the C++ API

Hi,

I uploaded on the SVN repository the first part of the slack-get C++ API.

I am coding this one to be as close as possible to the Perl one. So the first two classes uploaded are, of course, Slackget::Package and Slackget::PackageList. As you can see I am using the Slackget:: namespace in order to identify slack-get's classes.

As usual, the documentation and all doxygen needed files are already on the SVN too.

I am focusing on usability and stable features for this C++ API. This means that, in a first time, I will not translate all features. All classes that will fall in those exceptions will be adequatly documented.

My goal with this API is to start coding the graphical user interface as quickly as possible.

Arnaud Dupuis

Wednesday 13 August 2008

slack-get development diary #6

Back from a long silence period, here it is : the 6th opus of the "slack-get development diary" !
There is a lot of new things that I need to talk about !
First the bad news : I saw on CPAN reports that the "fix" I made for Slackware::Slackget to properly test on Solaris OS is not working.
That is a bad thing but... I don't really see the purpose on trying to fix an issue on an OS which is not a Slackware based one and not even a GNU/Linux OS ! The Slackware::Slackget module will never be usefull on this OS, so since I have no Solaris to test I will just forget about it (unless somebody provides me with a patch for this system.

Now for all the good news :
  • slack-get suite (sg_daemon + slack-get) is now able to install, upgrade and remove packages
That's the first point, and I think it's a pretty important one. I fixed all the daemon and the (cli) client to make them able to perform packages operations without any problems.
So from now on, you can start a daemon and do a "slack-get install flightgear" for example :)
That's a very important point but it's nothing worth talking about without the dependencies tracking system.
Talking about that...
  • the dependencies tracking system is now fully functionnal
Woohooo ! This part was certainly one of the most painfull, but I finally manage to get it working the right way.
This part still need to be tested and there is no guarantees, so far, that it is working properly in all cases.
But so far my tests where very promisefull ! I add no problems and for the moment I have not yet discovered any bugs in this feature.
Again, that does not means that I will not uncover bugs later.
  • add support for automatic GPG key import
I added the possibility for the sg_daemon to download and import a GPG key. For the moment it only import Slackware Project's key and it is almost hardcoded but there is no reasons to extend this feature to all medias sooner or later.
This feature works well and is totally automatic : if sg_daemon do not find the Slackware Project's key in the user's GPG keyring, it download it and import it. Nice and easy.
  • add new feature to slack-get (cli client)
I added a new command to slack-get, it is called "info". You can use it the exact same way than the "search" command (this is the exact same code which is processing it).
The goal of this command is to provide more informations about a package. Here is an usage example :
$ ./slack-get info flightgear --media=slacky
Package: flightgear-1.0.0-i686-1as
Size (compressed): 3158 KB
Version: 1.0.0
Source: slacky
Description: The FlightGear flight simulator open-source project.The  goal  of  the  FlightGear project is to create a
sophisticated flight simulator framework for  use  in  research  or  academic environments,  for the development and pursuit
of other interesting flight simulation ideas, and as an end-user application
http://www.flightgear.org/ WWW.SLACKY.IT PackaGer Gohanz.


This little example, allow me to introduce the new command line option : --media. This one allow you to restrict the "search" or "info" commandes to the choosen media (in the previous example I wanted only results from the Slacky.it website).

Last about the slack-get cli client, I fixed lots of "non closing bugs". The non closing bugs are an annoying problem of slack-get cli client.
While the whole system became multitasks, it's becomming difficult to keep track of what the client asked by itself (particularly in a multi-administrators context), and after asking a sg_daemon to perform some tasks (and after the tasks are finished) the client does not end.
I corrected a lot of thoses problems.
A good example of this issue is with the "slack-get update" command. This one scheduled a tasks to upgrade all packages which have new ones in the patches/ subtree of the official-media (see config.xml). After the update, the client was not quitting. It is now corrected.
  • dynamic network backends negociation
Some of you may have noticed that sg_daemon should be able to dynamically negociate what network backends the client and it should use to understand each others. Until this morning it was not working, and it is now !
If sg_daemon supports XML and Base64 backends, and if the slack-get client supports XML and Gzip backends ; they will both agree on using the biggest common denominator (in this case they will use XML only).
I am very happy (and quite proud) of this mechanism. It allows tons of new development and many plugins to come !
  • lots of updates in the Slackware::Slackget Perl module
Last but not least I made tons of modifications in the Slackware::Slackget module. I added constants, generative methods to Slackware::Slackget::Media, add codes to Slackware::Slackget::GPG to support new import features, add method to Slackware::Slackget to check host's Slackware's version, and so on and so forth !

As a conclusion, I will just say that there is still some works to do but it's becomming to be a very usable tool. I'm using it every day now.
I hope all the work I made on slack-get will be of interets for you all !
As a bonus track I give you the new slack-get logo (that I made myself... so be kind ;-) )


Enjoy !

Arnaud Dupuis


Thursday 20 March 2008

Hardware failure and slack-get delay

Hi,
Like the title of this post can let you imagine, my main computer's hardware is all broken.
After a hard disk drive, replacement (87 EUR or 137 USD), a CPU replacement (190 EUR or 300 USD) I now need to replace my mainboard (225 EUR or 353 USD)...
All those thing leads to 2 things :
  1. I've no more money (so please enjoy a click on a google add ;-) )
  2. I spend a lot of time trying to go to the shop, and try to fix this damn computer.
The direct consequence is that the slack-get development diary is delayed until I fix my computer.
Why ? Just because there is an important pending SVN commit (waiting a data recovering) on one of my broken disk...

Sorry for the delay but hu...

By the way I strongly advice French preoples against the IT shops in Paris' "rue montgallet" unless they are willing to save 200 € on 1500 in order to cancel their hardware's garantuee.


Arnaud Dupuis

Monday 17 March 2008

New english data file for PKanaEditor

Hi,

I saw - thanks to users mails - that I only gave a french data file with PKanaEditor 0.2.
So I hereby correct this mistake by providing you (attach to this post) an english localized data file (PKanaEditor English localized data file).
I hope it will fit english speaker needs !

To use this file, you just have to download it, open PKanaEditor's settings, choose a "Custom..." data source and select the file you just download as the source.

In version 0.3 there will be an automatic OS language discovering. While I'm confessing about the next release I can also tell you that I'm rewritting the auto-completion engine. The current one is indeed... a bit buggy... It generally works not too bad but their is some important issues (for example when you hit the carriage return key, you have to also hit the space key or no completion is done...).
The new engine is way better because I put the code I wrote to the dustbin and I'm now using Qt's features... And wonder what ? It's A LOT better ;)

Oh and by the way the slack-get development diary will be back this week (probably on wednesday), because I have one or two little thing to tell you.

Enjoy!

Arnaud Dupuis.

Saturday 8 March 2008

PKanaEditor - The "P" Kana Editor v0.2 - windows binaries

Hi,
Since I'm currently working on a windows xp computer, I got the occasion to compile PKanaEditor on this platform.
So, attached to this post is the windows installer containing required Qt dll and PKanaEditor binary.

This version is provided for convenience without any guarantee it will work on your windows install ;-)

Enjoy !

Arnaud Dupuis

Monday 3 March 2008

PKanaEditor - The "P" Kana Editor v0.2 released

Hi,
After some weeks of kind of hard work, here is the 0.2 version of the "P" Kana Editor.
It's now fully rewrote in C++/Qt 4.x and that's one of the smallest changes I made !
I also add a configuration window and the editor now features an intuitive "kana" completion and an help system on completion's proposal !
Moreover PKanaEditor is now multiplateform and can be used on Linux based system but also on windows systems (only XP tested) and Mac OS X (hum... it should be...) and most of the UNIX based system (*BSD, etc.).
You can download the sources from Qt-apps.org or from here. The archive is also attached to this post.

The one thing I couldn't do for this release is to find a meaning to the "P" ;-)

I hope you will enjoy it !

Arnaud Dupuis

Tuesday 26 February 2008

Public test of the PKanaEditor main widgets (KanaEditor, KanaTextEdit and KanaListWidgetItem)

Hi,

I finished to implements almost all features I wanted for PKanaEditor 0.2... in the editor widget. Well that left some works to have a complete application working smooth and fine. But since the editor widget is almost finished, I would like to have some feedback.
So I hereby release the first alpha version of this editor. Please note that this is not the complete application, it do not allow you to save your work and do nothing else but to translate what you write from romanji to kana.

I still would like some feedback about the choice I made in the implementation.
I am particularly interested in your opinion about the following points :
  • the way the kana are automatically presented to user (the completion through the "helper" popup)
  • the contextual help system (when you let your mouse above a kana a tooltip with a big version of the kana and it's meaning (for kanjis) is drawn)
  • your global feeling about this editor.
Please keep in mind that this is only the editor part of the software !
There is still time before the release of the whole program. So if some brave souls could test this editor and give me interesting feedback, I could make it better.

In order to use this editor you have to compile it. This means you need Qt4 (at least 4.2.0 but 4.3.0 or newer is recommended), g++ and make.
To compile the code for your plateform you just have to do the followings :
qmake PKanaEditor.pro
make
./PKanaEditor


I tested it on GNU/Linux (Slackware+KDE) and Windows XP and it should compile and run on Mac OS X and most of the common Unice (*BSD, etc.).
Here is a screenshot of the windows xp version :


I hope you will like it !

don't forget: feel free to send me your feelings about this... Did I mention that I wanted feedback ?

Arnaud Dupuis

Monday 25 February 2008

PKanaEditor updates

Hi,
After some thoughs I choose to change the way the helper is shown in the KanaEditor.
The tab-based widget was not easy to use in real usage conditions.
So I changed the thing and made a new helper based on a single QListWidget.
Here is the new result on Linux/KDE :


And on windows XP :

I think the Japanese font installed on the windows I use are just crappy.
Else, I can't explain the difference in quality between the windows version and the Linux one.
Next time, I will try to compile it on apple's Mac OS X.

Last but not least, I made a Qt Designer plugin of this KanaEditor widget. And thanks to the guy of irc://irc.freenode.net#qt I fixed a damn semi-colon at the end of the class definition which was "preventing" my code to compile...

See you later.

Arnaud Dupuis

Wednesday 20 February 2008

PKanaEditor new version proof of concept

Hi,
I never talk about my private life (or very few), but this time it had an influence on my Open Source work !
So here is the information : I will be married by june !
And my futur wife and I decided to spend our honeymoon in Japan... So make the link by yourself between this journey and PKanaEditor ;-)

So I have begin to code a proof of concept in C++/Qt4 and with some surprise it works pretty good ! Have a look at this screenshots :


Moreover, my new mission force me to code under microsoft windows xp, so I tried to recompile this PoC under windows and it works too ! Have a look :


Dudes from Trolltech made some incredible works ! I know it works since years but I didn't put my hands on a windows computer  in more than 8 years, and at this time I wasn't programming at all... I was too young ;-).

I now lack the XML loading of the data file and this PoC will be a stable version :)

For those who are interested in Qt programming, I do the trick translating romanji to (hiraga|kataka)na|kanji by subclassing QListWidgetItem and adding a _romanji internal QString to this item. The actual displayed character is set as the item text. Pretty simple, like the major part of Qt programming !!

The only real problem is to find a new meaning to the "P" of PKanaEditor (because it originally means Perl Kana Editor)...

Arnaud Dupuis

Friday 15 February 2008

compatibility of the Slackware::Slackget Perl module version 0.15_99

Hi,
It looks like that the latest released version of the Slackware::Slackget Perl module is quite incompatible with the Solaris operating system.
I was expecting this kind of problem with this release because I added more tests to the test suite. And Slackware::Slackget, as its name said, is designed to run on Slackware GNU/Linux based distributions.
So before the 0.15 final release, in order to provide a very usefull test suite, I will add some more tests.
And unfortunately, I expect more issues... The more the test suite is accurate, the more it will point the problem with Slackware incompatible systems.

The problem with the Solaris systems is that the `file` command do not support the -b switch. I use the file command instead of a CPAN module to reduce the amount of dependencies of Slackware::Slackget but I will look at this and try to make the Slackware::Slackget::File class use a CPAN module if installed (like File::Type).

Arnaud Dupuis

Saturday 2 February 2008

Release: Slackware::Slackget v0.15_99 and SGNC documentation

Hi,

A new version of the Slackware::Slackget module was released few hours ago on CPAN.
This release features the followings changes :
    - modify Slackware::Slackget::File->filename() behavior to allow it to set the filename
    - fix is_heavy_word() method in Slackware::Slackget::Package, wich now return the correct result
    - update Slackware::Slackget::Date to make it fill the month-name from the month-number
    - update Slackware::Slackget::Date by overloading '<=>' and 'cmp'
    - changed all classes of the Slackware::Slackget module to be compliant with the slack-get naming convention (SGNCC : Slack-Get Naming Convention Compliant) (http://www.infinityperl.org/post/2008/01/30/slack-get-API-review)
    - add more tests to the test suite for the followings classes :
        * Slackware::Slackget::File (SGNCC & backward compatible)
        * Slackware::Slackget::Media (SGNCC & backward compatible)
        * Slackware::Slackget::Date (SGNCC& backward compatible)
        * Slackware::Slackget::Package (SGNCC & backward compatible)

It is tagged as a developers' release for the moment since all the test for all modified (SGNCC) modules, the documentation is not yet up-to-date considering all the changes made, and I still need some time to test if their is absolutely no side effects due to the changes I made in the API.

Arnaud Dupuis


- page 2 of 3 -